diff --git a/README.md b/README.md index 63b757b..ee160ed 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,7 @@ Class | Method | HTTP request | Description *Forms1099Api* | [**get1099FormPdf**](docs/A1099/V2/Forms1099Api.md#get1099formpdf) | **GET** /1099/forms/{id}/pdf | Retrieve the PDF file for a 1099/1095/W2/1042S form *Forms1099Api* | [**list1099Forms**](docs/A1099/V2/Forms1099Api.md#list1099forms) | **GET** /1099/forms | List 1099/1095/W2/1042S forms *Forms1099Api* | [**update1099Form**](docs/A1099/V2/Forms1099Api.md#update1099form) | **PUT** /1099/forms/{id} | Update a 1099/1095/W2/1042S form +*FormsW9Api* | [**createAndSendW9FormEmail**](docs/A1099/V2/FormsW9Api.md#createandsendw9formemail) | **POST** /w9/forms/$create-and-send-email | Create a minimal W9/W4/W8 form and sends the e-mail request *FormsW9Api* | [**createW9Form**](docs/A1099/V2/FormsW9Api.md#createw9form) | **POST** /w9/forms | Create a W9/W4/W8 form *FormsW9Api* | [**deleteW9Form**](docs/A1099/V2/FormsW9Api.md#deletew9form) | **DELETE** /w9/forms/{id} | Delete a W9/W4/W8 form *FormsW9Api* | [**getW9Form**](docs/A1099/V2/FormsW9Api.md#getw9form) | **GET** /w9/forms/{id} | Retrieve a W9/W4/W8 form @@ -163,7 +164,7 @@ Class | Method | HTTP request | Description *Issuers1099Api* | [**getIssuer**](docs/A1099/V2/Issuers1099Api.md#getissuer) | **GET** /1099/issuers/{id} | Retrieve an issuer *Issuers1099Api* | [**getIssuers**](docs/A1099/V2/Issuers1099Api.md#getissuers) | **GET** /1099/issuers | List issuers *Issuers1099Api* | [**updateIssuer**](docs/A1099/V2/Issuers1099Api.md#updateissuer) | **PUT** /1099/issuers/{id} | Update an issuer -*Jobs1099Api* | [**getJob**](docs/A1099/V2/Jobs1099Api.md#getjob) | **GET** /1099/jobs/{id} | Retrieves information about the job +*JobsApi* | [**getJob**](docs/A1099/V2/JobsApi.md#getjob) | **GET** /jobs/{id} | Retrieves information about the job ## Documentation for Models @@ -250,134 +251,72 @@ Class | Method | HTTP request | Description ### A1099 V2 Model Documentation - - [Avalara.SDK.model.A1099.V2.Attribute](docs/A1099/V2/Attribute.md) - [Avalara.SDK.model.A1099.V2.AuthorizedApiRequestModel](docs/A1099/V2/AuthorizedApiRequestModel.md) - [Avalara.SDK.model.A1099.V2.AuthorizedApiRequestV2DataModel](docs/A1099/V2/AuthorizedApiRequestV2DataModel.md) - - [Avalara.SDK.model.A1099.V2.BaseCompanyModel](docs/A1099/V2/BaseCompanyModel.md) - - [Avalara.SDK.model.A1099.V2.BaseFormListRequest](docs/A1099/V2/BaseFormListRequest.md) - - [Avalara.SDK.model.A1099.V2.BulkUpsert1099FormsRequest](docs/A1099/V2/BulkUpsert1099FormsRequest.md) - [Avalara.SDK.model.A1099.V2.CompanyCreateUpdateRequestModel](docs/A1099/V2/CompanyCreateUpdateRequestModel.md) - - [Avalara.SDK.model.A1099.V2.CompanyModel](docs/A1099/V2/CompanyModel.md) - [Avalara.SDK.model.A1099.V2.CompanyResponse](docs/A1099/V2/CompanyResponse.md) - - [Avalara.SDK.model.A1099.V2.CompanyResponseModel](docs/A1099/V2/CompanyResponseModel.md) - - [Avalara.SDK.model.A1099.V2.CoveredIndividualReference](docs/A1099/V2/CoveredIndividualReference.md) - - [Avalara.SDK.model.A1099.V2.CoveredIndividualReferenceResponse](docs/A1099/V2/CoveredIndividualReferenceResponse.md) - - [Avalara.SDK.model.A1099.V2.CoveredIndividualRequest](docs/A1099/V2/CoveredIndividualRequest.md) - - [Avalara.SDK.model.A1099.V2.Create1099Form201Response](docs/A1099/V2/Create1099Form201Response.md) + - [Avalara.SDK.model.A1099.V2.CoveredIndividual](docs/A1099/V2/CoveredIndividual.md) + - [Avalara.SDK.model.A1099.V2.CreateAndSendW9FormEmailRequest](docs/A1099/V2/CreateAndSendW9FormEmailRequest.md) + - [Avalara.SDK.model.A1099.V2.CreateCompanyRequest](docs/A1099/V2/CreateCompanyRequest.md) + - [Avalara.SDK.model.A1099.V2.CreateIssuerRequest](docs/A1099/V2/CreateIssuerRequest.md) - [Avalara.SDK.model.A1099.V2.CreateW9Form201Response](docs/A1099/V2/CreateW9Form201Response.md) - [Avalara.SDK.model.A1099.V2.CreateW9FormRequest](docs/A1099/V2/CreateW9FormRequest.md) - - [Avalara.SDK.model.A1099.V2.Data](docs/A1099/V2/Data.md) + - [Avalara.SDK.model.A1099.V2.EntryStatusResponse](docs/A1099/V2/EntryStatusResponse.md) - [Avalara.SDK.model.A1099.V2.ErrorModel](docs/A1099/V2/ErrorModel.md) - [Avalara.SDK.model.A1099.V2.ErrorResponse](docs/A1099/V2/ErrorResponse.md) - [Avalara.SDK.model.A1099.V2.ErrorResponseItem](docs/A1099/V2/ErrorResponseItem.md) - [Avalara.SDK.model.A1099.V2.Form1042S](docs/A1099/V2/Form1042S.md) - - [Avalara.SDK.model.A1099.V2.Form1042SList](docs/A1099/V2/Form1042SList.md) - - [Avalara.SDK.model.A1099.V2.Form1042SListItem](docs/A1099/V2/Form1042SListItem.md) - - [Avalara.SDK.model.A1099.V2.Form1042SListItemResponse](docs/A1099/V2/Form1042SListItemResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1042SRequest](docs/A1099/V2/Form1042SRequest.md) - - [Avalara.SDK.model.A1099.V2.Form1042SResponse](docs/A1099/V2/Form1042SResponse.md) - [Avalara.SDK.model.A1099.V2.Form1095B](docs/A1099/V2/Form1095B.md) - - [Avalara.SDK.model.A1099.V2.Form1095BList](docs/A1099/V2/Form1095BList.md) - - [Avalara.SDK.model.A1099.V2.Form1095BListItem](docs/A1099/V2/Form1095BListItem.md) - - [Avalara.SDK.model.A1099.V2.Form1095BListItemResponse](docs/A1099/V2/Form1095BListItemResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1095BRequest](docs/A1099/V2/Form1095BRequest.md) - - [Avalara.SDK.model.A1099.V2.Form1095BResponse](docs/A1099/V2/Form1095BResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1095CList](docs/A1099/V2/Form1095CList.md) - - [Avalara.SDK.model.A1099.V2.Form1095CListItem](docs/A1099/V2/Form1095CListItem.md) + - [Avalara.SDK.model.A1099.V2.Form1095C](docs/A1099/V2/Form1095C.md) - [Avalara.SDK.model.A1099.V2.Form1099Base](docs/A1099/V2/Form1099Base.md) - - [Avalara.SDK.model.A1099.V2.Form1099BaseResponse](docs/A1099/V2/Form1099BaseResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099Div](docs/A1099/V2/Form1099Div.md) - - [Avalara.SDK.model.A1099.V2.Form1099DivList](docs/A1099/V2/Form1099DivList.md) - - [Avalara.SDK.model.A1099.V2.Form1099DivListItem](docs/A1099/V2/Form1099DivListItem.md) - - [Avalara.SDK.model.A1099.V2.Form1099DivListItemResponse](docs/A1099/V2/Form1099DivListItemResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1099DivRequest](docs/A1099/V2/Form1099DivRequest.md) - - [Avalara.SDK.model.A1099.V2.Form1099DivResponse](docs/A1099/V2/Form1099DivResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099Int](docs/A1099/V2/Form1099Int.md) - - [Avalara.SDK.model.A1099.V2.Form1099IntList](docs/A1099/V2/Form1099IntList.md) - - [Avalara.SDK.model.A1099.V2.Form1099IntListItem](docs/A1099/V2/Form1099IntListItem.md) - - [Avalara.SDK.model.A1099.V2.Form1099IntListItemResponse](docs/A1099/V2/Form1099IntListItemResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1099IntRequest](docs/A1099/V2/Form1099IntRequest.md) - - [Avalara.SDK.model.A1099.V2.Form1099IntResponse](docs/A1099/V2/Form1099IntResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099K](docs/A1099/V2/Form1099K.md) - - [Avalara.SDK.model.A1099.V2.Form1099KList](docs/A1099/V2/Form1099KList.md) - - [Avalara.SDK.model.A1099.V2.Form1099KListItem](docs/A1099/V2/Form1099KListItem.md) - - [Avalara.SDK.model.A1099.V2.Form1099KListItemResponse](docs/A1099/V2/Form1099KListItemResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1099KRequest](docs/A1099/V2/Form1099KRequest.md) - - [Avalara.SDK.model.A1099.V2.Form1099KResponse](docs/A1099/V2/Form1099KResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1099ListResponse](docs/A1099/V2/Form1099ListResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1099ListResponseValueInner](docs/A1099/V2/Form1099ListResponseValueInner.md) + - [Avalara.SDK.model.A1099.V2.Form1099ListRequest](docs/A1099/V2/Form1099ListRequest.md) - [Avalara.SDK.model.A1099.V2.Form1099Misc](docs/A1099/V2/Form1099Misc.md) - - [Avalara.SDK.model.A1099.V2.Form1099MiscList](docs/A1099/V2/Form1099MiscList.md) - - [Avalara.SDK.model.A1099.V2.Form1099MiscListItem](docs/A1099/V2/Form1099MiscListItem.md) - - [Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse](docs/A1099/V2/Form1099MiscListItemResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1099MiscRequest](docs/A1099/V2/Form1099MiscRequest.md) - - [Avalara.SDK.model.A1099.V2.Form1099MiscResponse](docs/A1099/V2/Form1099MiscResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099Nec](docs/A1099/V2/Form1099Nec.md) - - [Avalara.SDK.model.A1099.V2.Form1099NecList](docs/A1099/V2/Form1099NecList.md) - - [Avalara.SDK.model.A1099.V2.Form1099NecListItem](docs/A1099/V2/Form1099NecListItem.md) - - [Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse](docs/A1099/V2/Form1099NecListItemResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1099NecRequest](docs/A1099/V2/Form1099NecRequest.md) - - [Avalara.SDK.model.A1099.V2.Form1099NecResponse](docs/A1099/V2/Form1099NecResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1099ProccessResult](docs/A1099/V2/Form1099ProccessResult.md) - - [Avalara.SDK.model.A1099.V2.Form1099ProccessResultProcessedFormsInner](docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md) - [Avalara.SDK.model.A1099.V2.Form1099R](docs/A1099/V2/Form1099R.md) - - [Avalara.SDK.model.A1099.V2.Form1099RList](docs/A1099/V2/Form1099RList.md) - - [Avalara.SDK.model.A1099.V2.Form1099RListItem](docs/A1099/V2/Form1099RListItem.md) - - [Avalara.SDK.model.A1099.V2.Form1099RListItemResponse](docs/A1099/V2/Form1099RListItemResponse.md) - - [Avalara.SDK.model.A1099.V2.Form1099RRequest](docs/A1099/V2/Form1099RRequest.md) - - [Avalara.SDK.model.A1099.V2.Form1099RResponse](docs/A1099/V2/Form1099RResponse.md) - [Avalara.SDK.model.A1099.V2.Form1099StatusDetail](docs/A1099/V2/Form1099StatusDetail.md) - - [Avalara.SDK.model.A1099.V2.FormRequestBase](docs/A1099/V2/FormRequestBase.md) - - [Avalara.SDK.model.A1099.V2.FormRequestListItemBase](docs/A1099/V2/FormRequestListItemBase.md) - - [Avalara.SDK.model.A1099.V2.FormResponseBase](docs/A1099/V2/FormResponseBase.md) - - [Avalara.SDK.model.A1099.V2.FormSingleRequestBase](docs/A1099/V2/FormSingleRequestBase.md) - [Avalara.SDK.model.A1099.V2.Get1099Form200Response](docs/A1099/V2/Get1099Form200Response.md) - - [Avalara.SDK.model.A1099.V2.ICreateForm1099Request](docs/A1099/V2/ICreateForm1099Request.md) - - [Avalara.SDK.model.A1099.V2.IUpdateForm1099Request](docs/A1099/V2/IUpdateForm1099Request.md) - [Avalara.SDK.model.A1099.V2.IW9FormDataModelsOneOf](docs/A1099/V2/IW9FormDataModelsOneOf.md) - - [Avalara.SDK.model.A1099.V2.IncludedBase](docs/A1099/V2/IncludedBase.md) - [Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough](docs/A1099/V2/IntermediaryOrFlowThrough.md) - - [Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughRequest](docs/A1099/V2/IntermediaryOrFlowThroughRequest.md) - - [Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughResponse](docs/A1099/V2/IntermediaryOrFlowThroughResponse.md) - [Avalara.SDK.model.A1099.V2.IrsResponse](docs/A1099/V2/IrsResponse.md) - [Avalara.SDK.model.A1099.V2.IssuerCommand](docs/A1099/V2/IssuerCommand.md) - [Avalara.SDK.model.A1099.V2.IssuerResponse](docs/A1099/V2/IssuerResponse.md) - - [Avalara.SDK.model.A1099.V2.JobResult](docs/A1099/V2/JobResult.md) - - [Avalara.SDK.model.A1099.V2.Link](docs/A1099/V2/Link.md) - - [Avalara.SDK.model.A1099.V2.OfferAndCoverageRequest](docs/A1099/V2/OfferAndCoverageRequest.md) + - [Avalara.SDK.model.A1099.V2.JobResponse](docs/A1099/V2/JobResponse.md) + - [Avalara.SDK.model.A1099.V2.OfferAndCoverage](docs/A1099/V2/OfferAndCoverage.md) - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelCompanyResponse](docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md) + - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelForm1099Base](docs/A1099/V2/PaginatedQueryResultModelForm1099Base.md) - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelIssuerResponse](docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md) - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelW9FormBaseResponse](docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md) - [Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent](docs/A1099/V2/PrimaryWithholdingAgent.md) - - [Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentRequest](docs/A1099/V2/PrimaryWithholdingAgentRequest.md) - - [Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentResponse](docs/A1099/V2/PrimaryWithholdingAgentResponse.md) - [Avalara.SDK.model.A1099.V2.StateAndLocalWithholding](docs/A1099/V2/StateAndLocalWithholding.md) - - [Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest](docs/A1099/V2/StateAndLocalWithholdingRequest.md) - - [Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse](docs/A1099/V2/StateAndLocalWithholdingResponse.md) - [Avalara.SDK.model.A1099.V2.StateEfileStatusDetail](docs/A1099/V2/StateEfileStatusDetail.md) - - [Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse](docs/A1099/V2/StateEfileStatusDetailResponse.md) - - [Avalara.SDK.model.A1099.V2.StatusDetail](docs/A1099/V2/StatusDetail.md) - [Avalara.SDK.model.A1099.V2.SubstantialUsOwnerRequest](docs/A1099/V2/SubstantialUsOwnerRequest.md) - [Avalara.SDK.model.A1099.V2.SubstantialUsOwnerResponse](docs/A1099/V2/SubstantialUsOwnerResponse.md) - [Avalara.SDK.model.A1099.V2.TinMatchStatusResponse](docs/A1099/V2/TinMatchStatusResponse.md) - - [Avalara.SDK.model.A1099.V2.Update1099Form200Response](docs/A1099/V2/Update1099Form200Response.md) - [Avalara.SDK.model.A1099.V2.ValidationError](docs/A1099/V2/ValidationError.md) - - [Avalara.SDK.model.A1099.V2.ValidationErrorResponse](docs/A1099/V2/ValidationErrorResponse.md) - [Avalara.SDK.model.A1099.V2.W4FormDataModel](docs/A1099/V2/W4FormDataModel.md) + - [Avalara.SDK.model.A1099.V2.W4FormMinimalRequest](docs/A1099/V2/W4FormMinimalRequest.md) - [Avalara.SDK.model.A1099.V2.W4FormRequest](docs/A1099/V2/W4FormRequest.md) - [Avalara.SDK.model.A1099.V2.W4FormResponse](docs/A1099/V2/W4FormResponse.md) + - [Avalara.SDK.model.A1099.V2.W8BenEFormMinimalRequest](docs/A1099/V2/W8BenEFormMinimalRequest.md) - [Avalara.SDK.model.A1099.V2.W8BenEFormRequest](docs/A1099/V2/W8BenEFormRequest.md) - [Avalara.SDK.model.A1099.V2.W8BenEFormResponse](docs/A1099/V2/W8BenEFormResponse.md) - [Avalara.SDK.model.A1099.V2.W8BenESubstantialUsOwnerDataModel](docs/A1099/V2/W8BenESubstantialUsOwnerDataModel.md) - [Avalara.SDK.model.A1099.V2.W8BenFormDataModel](docs/A1099/V2/W8BenFormDataModel.md) + - [Avalara.SDK.model.A1099.V2.W8BenFormMinimalRequest](docs/A1099/V2/W8BenFormMinimalRequest.md) - [Avalara.SDK.model.A1099.V2.W8BenFormRequest](docs/A1099/V2/W8BenFormRequest.md) - [Avalara.SDK.model.A1099.V2.W8BenFormResponse](docs/A1099/V2/W8BenFormResponse.md) - [Avalara.SDK.model.A1099.V2.W8BeneFormDataModel](docs/A1099/V2/W8BeneFormDataModel.md) - [Avalara.SDK.model.A1099.V2.W8ImyFormDataModel](docs/A1099/V2/W8ImyFormDataModel.md) + - [Avalara.SDK.model.A1099.V2.W8ImyFormMinimalRequest](docs/A1099/V2/W8ImyFormMinimalRequest.md) - [Avalara.SDK.model.A1099.V2.W8ImyFormRequest](docs/A1099/V2/W8ImyFormRequest.md) - [Avalara.SDK.model.A1099.V2.W8ImyFormResponse](docs/A1099/V2/W8ImyFormResponse.md) + - [Avalara.SDK.model.A1099.V2.W9FormBaseMinimalRequest](docs/A1099/V2/W9FormBaseMinimalRequest.md) - [Avalara.SDK.model.A1099.V2.W9FormBaseRequest](docs/A1099/V2/W9FormBaseRequest.md) - [Avalara.SDK.model.A1099.V2.W9FormBaseResponse](docs/A1099/V2/W9FormBaseResponse.md) - [Avalara.SDK.model.A1099.V2.W9FormDataModel](docs/A1099/V2/W9FormDataModel.md) + - [Avalara.SDK.model.A1099.V2.W9FormMinimalRequest](docs/A1099/V2/W9FormMinimalRequest.md) - [Avalara.SDK.model.A1099.V2.W9FormRequest](docs/A1099/V2/W9FormRequest.md) - [Avalara.SDK.model.A1099.V2.W9FormResponse](docs/A1099/V2/W9FormResponse.md) diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index 98eb85b..11ba425 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -1,6 +1,6 @@ # CompaniesW9Api -All URIs are relative to *https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/avalara1099* +All URIs are relative to *https://api.sbx.avalara.com/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -14,7 +14,7 @@ Method | HTTP request | Description ## createCompany -> CompanyResponseModel createCompany(avalaraVersion, xCorrelationId, xAvalaraClient, companyCreateUpdateRequestModel) +> CompanyResponse createCompany(avalaraVersion, xCorrelationId, xAvalaraClient, createCompanyRequest) Create a company @@ -49,11 +49,11 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "5ba3a8b6-bf05-4aaa-b8cb-d06c7cfea0f7"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "68cce84c-ae6e-4cef-bdc6-4620c710b5e5"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . - CompanyCreateUpdateRequestModel companyCreateUpdateRequestModel = new CompanyCreateUpdateRequestModel(); // CompanyCreateUpdateRequestModel | The company to create + CreateCompanyRequest createCompanyRequest = new CreateCompanyRequest(); // CreateCompanyRequest | The company to create try { - CompanyResponseModel result = apiInstance.createCompany(avalaraVersion, xCorrelationId, xAvalaraClient, companyCreateUpdateRequestModel); + CompanyResponse result = apiInstance.createCompany(avalaraVersion, xCorrelationId, xAvalaraClient, createCompanyRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CompaniesW9Api#createCompany"); @@ -74,11 +74,11 @@ Name | Type | Description | Notes **avalaraVersion** | **String**| API version | **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **companyCreateUpdateRequestModel** | [**CompanyCreateUpdateRequestModel**](CompanyCreateUpdateRequestModel.md)| The company to create | [optional] + **createCompanyRequest** | [**CreateCompanyRequest**](CreateCompanyRequest.md)| The company to create | [optional] ### Return type -[**CompanyResponseModel**](CompanyResponseModel.md) +[**CompanyResponse**](CompanyResponse.md) ### Authorization @@ -136,7 +136,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The company to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "07a8ecdb-0465-469d-8bff-49fce135d5e4"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "f2e08ea9-6e1e-4828-91f9-4926ff26dbe4"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.deleteCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -228,7 +228,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "f047fdc5-a6e4-4290-8c5c-d4da96ad0699"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "f431c7bb-9661-447a-8f5f-b17b3d55a06c"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelCompanyResponse result = apiInstance.getCompanies(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -321,7 +321,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | Id of the company String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "3f7b5971-06e7-4459-84af-61db7fdcb027"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "c5c11797-5ea9-4ec3-85ba-ed4e0ee63300"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { CompanyResponse result = apiInstance.getCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -373,7 +373,7 @@ Name | Type | Description | Notes ## updateCompany -> CompanyResponseModel updateCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient, companyCreateUpdateRequestModel) +> CompanyResponse updateCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient, createCompanyRequest) Update a company @@ -409,11 +409,11 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The ID of the company to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "1cd32062-b0bc-46a0-8311-a973b8fb3d56"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "86a26d78-90b6-4ca0-a10b-0221d11dd34a"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . - CompanyCreateUpdateRequestModel companyCreateUpdateRequestModel = new CompanyCreateUpdateRequestModel(); // CompanyCreateUpdateRequestModel | The updated company data + CreateCompanyRequest createCompanyRequest = new CreateCompanyRequest(); // CreateCompanyRequest | The updated company data try { - CompanyResponseModel result = apiInstance.updateCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient, companyCreateUpdateRequestModel); + CompanyResponse result = apiInstance.updateCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient, createCompanyRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CompaniesW9Api#updateCompany"); @@ -435,11 +435,11 @@ Name | Type | Description | Notes **avalaraVersion** | **String**| API version | **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **companyCreateUpdateRequestModel** | [**CompanyCreateUpdateRequestModel**](CompanyCreateUpdateRequestModel.md)| The updated company data | [optional] + **createCompanyRequest** | [**CreateCompanyRequest**](CreateCompanyRequest.md)| The updated company data | [optional] ### Return type -[**CompanyResponseModel**](CompanyResponseModel.md) +[**CompanyResponse**](CompanyResponse.md) ### Authorization diff --git a/docs/A1099/V2/CompanyCreateUpdateRequestModel.md b/docs/A1099/V2/CompanyCreateUpdateRequestModel.md index 79f0ee5..350d5e5 100644 --- a/docs/A1099/V2/CompanyCreateUpdateRequestModel.md +++ b/docs/A1099/V2/CompanyCreateUpdateRequestModel.md @@ -7,23 +7,23 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**telephone** | **String** | | [optional] | -|**tin** | **String** | | [optional] | -|**dbaName** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**doTinMatch** | **Boolean** | | [optional] | -|**groupName** | **String** | | [optional] | -|**foreignProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**resendRequests** | **Boolean** | | [optional] | -|**resendIntervalDays** | **Integer** | | [optional] | -|**maxReminderAttempts** | **Integer** | | [optional] | +|**name** | **String** | Legal name. Not the DBA name. | | +|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. | [optional] | +|**email** | **String** | Contact email address. For inquiries by vendors/employees. | | +|**address** | **String** | Address. | | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | | +|**telephone** | **String** | Contact phone number (must contain at least 10 digits, max 15 characters). | | +|**tin** | **String** | Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies). | | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**doTinMatch** | **Boolean** | Indicates whether the company authorizes IRS TIN matching. | [optional] | +|**groupName** | **String** | Group name for organizing companies (creates or finds group by name). | [optional] | +|**foreignProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**resendRequests** | **Boolean** | Boolean to enable automatic reminder emails (default: false). | [optional] | +|**resendIntervalDays** | **Integer** | Days between reminder emails (7-365, required if resendRequests is true). | [optional] | +|**maxReminderAttempts** | **Integer** | Maximum number of reminder attempts (1-52, required if resendRequests is true). | [optional] | diff --git a/docs/A1099/V2/CompanyResponse.md b/docs/A1099/V2/CompanyResponse.md index 6ddeb6d..ea3cd1c 100644 --- a/docs/A1099/V2/CompanyResponse.md +++ b/docs/A1099/V2/CompanyResponse.md @@ -7,26 +7,26 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**groupName** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**dbaName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**foreignProvince** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**telephone** | **String** | | [optional] | -|**tin** | **String** | | [optional] | -|**doTinMatch** | **Boolean** | | [optional] | -|**resendRequests** | **Boolean** | | [optional] | -|**resendIntervalDays** | **Integer** | | [optional] | -|**maxReminderAttempts** | **Integer** | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | +|**id** | **String** | Unique identifier set when the record is created. | [optional] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] | +|**name** | **String** | Legal name. Not the DBA name. | | +|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. | [optional] | +|**email** | **String** | Contact email address. For inquiries by vendors/employees. | | +|**address** | **String** | Address. | | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | | +|**telephone** | **String** | Contact phone number (must contain at least 10 digits, max 15 characters). | | +|**tin** | **String** | Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies). | | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**doTinMatch** | **Boolean** | Indicates whether the company authorizes IRS TIN matching. | [optional] | +|**groupName** | **String** | Group name for organizing companies (creates or finds group by name). | [optional] | +|**foreignProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**resendRequests** | **Boolean** | Boolean to enable automatic reminder emails (default: false). | [optional] | +|**resendIntervalDays** | **Integer** | Days between reminder emails (7-365, required if resendRequests is true). | [optional] | +|**maxReminderAttempts** | **Integer** | Maximum number of reminder attempts (1-52, required if resendRequests is true). | [optional] | diff --git a/docs/A1099/V2/CoveredIndividual.md b/docs/A1099/V2/CoveredIndividual.md new file mode 100644 index 0000000..5f5ba3d --- /dev/null +++ b/docs/A1099/V2/CoveredIndividual.md @@ -0,0 +1,33 @@ + + +# CoveredIndividual + +Covered individual information for health coverage forms + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Covered individual's ID | [optional] [readonly] | +|**firstName** | **String** | Covered individual's first name | | +|**middleName** | **String** | Covered individual's middle name | [optional] | +|**lastName** | **String** | Covered individual's last name | | +|**nameSuffix** | **String** | Covered individual's name suffix | [optional] | +|**tin** | **String** | Covered individual's Federal Tax Identification Number (TIN).. SSN or ITIN. Required unless unavailable. | [optional] | +|**birthDate** | **LocalDate** | Covered individual's date of birth - Required when SSN is missing. | [optional] | +|**coveredAllMonths** | **Boolean** | Coverage indicator for all 12 months | [optional] | +|**coveredJanuary** | **Boolean** | Coverage indicator for January | [optional] | +|**coveredFebruary** | **Boolean** | Coverage indicator for February | [optional] | +|**coveredMarch** | **Boolean** | Coverage indicator for March | [optional] | +|**coveredApril** | **Boolean** | Coverage indicator for April | [optional] | +|**coveredMay** | **Boolean** | Coverage indicator for May | [optional] | +|**coveredJune** | **Boolean** | Coverage indicator for June | [optional] | +|**coveredJuly** | **Boolean** | Coverage indicator for July | [optional] | +|**coveredAugust** | **Boolean** | Coverage indicator for August | [optional] | +|**coveredSeptember** | **Boolean** | Coverage indicator for September | [optional] | +|**coveredOctober** | **Boolean** | Coverage indicator for October | [optional] | +|**coveredNovember** | **Boolean** | Coverage indicator for November | [optional] | +|**coveredDecember** | **Boolean** | Coverage indicator for December | [optional] | + + + diff --git a/docs/A1099/V2/CreateAndSendW9FormEmailRequest.md b/docs/A1099/V2/CreateAndSendW9FormEmailRequest.md new file mode 100644 index 0000000..2a24073 --- /dev/null +++ b/docs/A1099/V2/CreateAndSendW9FormEmailRequest.md @@ -0,0 +1,34 @@ + + +# CreateAndSendW9FormEmailRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type. | [optional] [readonly] | +|**email** | **String** | The email address of the individual associated with the form. | | +|**employeeFirstName** | **String** | The first name of the employee. | | +|**employeeLastName** | **String** | The last name of the employee. | | +|**officeCode** | **String** | The office code associated with the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**name** | **String** | The name of the individual or entity associated with the form. | | +|**referenceNumber** | **String** | A reference number for the form. | [optional] | +|**accountNumber** | **String** | The account number associated with the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/CreateCompanyRequest.md b/docs/A1099/V2/CreateCompanyRequest.md new file mode 100644 index 0000000..31d2f82 --- /dev/null +++ b/docs/A1099/V2/CreateCompanyRequest.md @@ -0,0 +1,32 @@ + + +# CreateCompanyRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Legal name. Not the DBA name. | | +|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. | [optional] | +|**email** | **String** | Contact email address. For inquiries by vendors/employees. | | +|**address** | **String** | Address. | | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | | +|**telephone** | **String** | Contact phone number (must contain at least 10 digits, max 15 characters). | | +|**tin** | **String** | Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies). | | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**doTinMatch** | **Boolean** | Indicates whether the company authorizes IRS TIN matching. | [optional] | +|**groupName** | **String** | Group name for organizing companies (creates or finds group by name). | [optional] | +|**foreignProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**resendRequests** | **Boolean** | Boolean to enable automatic reminder emails (default: false). | [optional] | +|**resendIntervalDays** | **Integer** | Days between reminder emails (7-365, required if resendRequests is true). | [optional] | +|**maxReminderAttempts** | **Integer** | Maximum number of reminder attempts (1-52, required if resendRequests is true). | [optional] | +|**id** | **String** | Unique identifier set when the record is created. | [optional] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] | + + + diff --git a/docs/A1099/V2/CreateIssuerRequest.md b/docs/A1099/V2/CreateIssuerRequest.md new file mode 100644 index 0000000..2d817f9 --- /dev/null +++ b/docs/A1099/V2/CreateIssuerRequest.md @@ -0,0 +1,30 @@ + + +# CreateIssuerRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Legal name. Not the DBA name. | | +|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] | +|**tin** | **String** | Federal Tax Identification Number (TIN). | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] | +|**telephone** | **String** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | | +|**taxYear** | **Integer** | Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. | | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. | [optional] | +|**email** | **String** | Contact email address. For recipient inquiries. | | +|**address** | **String** | Address. | | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | | +|**zip** | **String** | ZIP/postal code. | | +|**foreignProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**transferAgentName** | **String** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] | +|**lastFiling** | **Boolean** | Indicates if this is the issuer's final year filing. | | +|**id** | **String** | Unique identifier set when the record is created. | [optional] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] | + + + diff --git a/docs/A1099/V2/CreateW9Form201Response.md b/docs/A1099/V2/CreateW9Form201Response.md index 42fad9b..a7c5ff9 100644 --- a/docs/A1099/V2/CreateW9Form201Response.md +++ b/docs/A1099/V2/CreateW9Form201Response.md @@ -104,13 +104,13 @@ |**signerName** | **String** | The name of the signer. | [optional] | |**capacityToSignCertification** | **Boolean** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] | |**id** | **String** | The unique identifier for the form. | [optional] | -|**entryStatus** | **String** | The form status. | [optional] | -|**entryStatusDate** | **OffsetDateTime** | The timestamp for the latest status update. | [optional] | +|**entryStatus** | [**EntryStatusResponse**](EntryStatusResponse.md) | The entry status information for the form. | [optional] | |**referenceId** | **String** | A reference identifier for the form. | [optional] | |**companyId** | **String** | The ID of the associated company. | [optional] | |**displayName** | **String** | The display name associated with the form. | [optional] | |**email** | **String** | The email address of the individual associated with the form. | [optional] | |**archived** | **Boolean** | Indicates whether the form is archived. | [optional] | +|**ancestorId** | **String** | Form ID of previous version. | [optional] | |**signature** | **String** | The signature of the form. | [optional] | |**signedDate** | **OffsetDateTime** | The date the form was signed. | [optional] | |**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | diff --git a/docs/A1099/V2/CreateW9FormRequest.md b/docs/A1099/V2/CreateW9FormRequest.md index 740cb7a..c1b7278 100644 --- a/docs/A1099/V2/CreateW9FormRequest.md +++ b/docs/A1099/V2/CreateW9FormRequest.md @@ -26,11 +26,11 @@ |**tin** | **String** | The taxpayer identification number (TIN). | [optional] | |**backupWithholding** | **Boolean** | Indicates whether backup withholding applies. | [optional] | |**is1099able** | **Boolean** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | |**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | |**signature** | **String** | The signature of the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | |**citizenshipCountry** | **String** | The country of citizenship. | [optional] | |**disregardedEntity** | **String** | The name of the disregarded entity receiving the payment (if applicable). | [optional] | |**entityType** | **String** | The entity type. | [optional] | diff --git a/docs/A1099/V2/EntryStatusResponse.md b/docs/A1099/V2/EntryStatusResponse.md new file mode 100644 index 0000000..cc88518 --- /dev/null +++ b/docs/A1099/V2/EntryStatusResponse.md @@ -0,0 +1,15 @@ + + +# EntryStatusResponse + +Represents the entry status information for a W9 form. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **String** | The form status. | [optional] | +|**time** | **OffsetDateTime** | The timestamp for the latest status update. | [optional] | + + + diff --git a/docs/A1099/V2/Form1042S.md b/docs/A1099/V2/Form1042S.md index be036df..666b1c8 100644 --- a/docs/A1099/V2/Form1042S.md +++ b/docs/A1099/V2/Form1042S.md @@ -2,73 +2,360 @@ # Form1042S +Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**uniqueFormId** | **String** | | [optional] | -|**recipientDateOfBirth** | **OffsetDateTime** | | [optional] | -|**recipientGiin** | **String** | | [optional] | -|**recipientForeignTin** | **String** | | [optional] | -|**lobCode** | **String** | | [optional] | -|**incomeCode** | **String** | | [optional] | -|**grossIncome** | **Double** | | [optional] | -|**withholdingIndicator** | **String** | | [optional] | -|**taxCountryCode** | **String** | | [optional] | -|**exemptionCodeChap3** | **String** | | [optional] | -|**exemptionCodeChap4** | **String** | | [optional] | -|**taxRateChap3** | **String** | | [optional] | -|**withholdingAllowance** | **Double** | | [optional] | -|**federalTaxWithheld** | **Double** | | [optional] | -|**taxNotDepositedIndicator** | **Boolean** | | [optional] | -|**academicIndicator** | **Boolean** | | [optional] | -|**taxWithheldOtherAgents** | **Double** | | [optional] | -|**amountRepaid** | **Double** | | [optional] | -|**taxPaidAgent** | **Double** | | [optional] | -|**chap3StatusCode** | **String** | | [optional] | -|**chap4StatusCode** | **String** | | [optional] | -|**primaryWithholdingAgent** | [**PrimaryWithholdingAgent**](PrimaryWithholdingAgent.md) | | [optional] | -|**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThrough**](IntermediaryOrFlowThrough.md) | | [optional] | -|**id** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**issuerId** | **Integer** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**federalEfile** | **Boolean** | | [optional] | -|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**stateEfile** | **Boolean** | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**referenceId** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**tinType** | **String** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**tin** | **String** | | [optional] | -|**noTin** | **Boolean** | | [optional] | -|**secondTinNotice** | **Boolean** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**nonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] [readonly] | +|**uniqueFormId** | **String** | Unique form identifier | | +|**recipientDateOfBirth** | **LocalDate** | Recipient's date of birth | [optional] | +|**recipientGiin** | **String** | Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'. | [optional] | +|**recipientForeignTin** | **String** | Recipient's foreign TIN. Required if email is specified, must fill either this or Chap3StatusCode. | [optional] | +|**lobCode** | [**LobCodeEnum**](#LobCodeEnum) | Limitation on Benefits (LOB) code for tax treaty purposes. Available values: - 01: Individual (Deprecated - valid only for tax years prior to 2019) - 02: Government - contracting state/political subdivision/local authority - 03: Tax exempt pension trust/Pension fund - 04: Tax exempt/Charitable organization - 05: Publicly-traded corporation - 06: Subsidiary of publicly-traded corporation - 07: Company that meets the ownership and base erosion test - 08: Company that meets the derivative benefits test - 09: Company with an item of income that meets the active trade or business test - 10: Discretionary determination - 11: Other - 12: No LOB article in treaty | [optional] | +|**incomeCode** | [**IncomeCodeEnum**](#IncomeCodeEnum) | Income code. Available values: Interest: - 01: Interest paid by US obligors - general - 02: Interest paid on real property mortgages - 03: Interest paid to controlling foreign corporations - 04: Interest paid by foreign corporations - 05: Interest on tax-free covenant bonds - 22: Interest paid on deposit with a foreign branch of a domestic corporation or partnership - 29: Deposit interest - 30: Original issue discount (OID) - 31: Short-term OID - 33: Substitute payment - interest - 51: Interest paid on certain actively traded or publicly offered securities(1) - 54: Substitute payments - interest from certain actively traded or publicly offered securities(1) Dividend: - 06: Dividends paid by U.S. corporations - general - 07: Dividends qualifying for direct dividend rate - 08: Dividends paid by foreign corporations - 34: Substitute payment - dividends - 40: Other dividend equivalents under IRC section 871(m) (formerly 871(l)) - 52: Dividends paid on certain actively traded or publicly offered securities(1) - 53: Substitute payments - dividends from certain actively traded or publicly offered securities(1) - 56: Dividend equivalents under IRC section 871(m) as a result of applying the combined transaction rules Other: - 09: Capital gains - 10: Industrial royalties - 11: Motion picture or television copyright royalties - 12: Other royalties (for example, copyright, software, broadcasting, endorsement payments) - 13: Royalties paid on certain publicly offered securities(1) - 14: Real property income and natural resources royalties - 15: Pensions, annuities, alimony, and/or insurance premiums - 16: Scholarship or fellowship grants - 17: Compensation for independent personal services(2) - 18: Compensation for dependent personal services(2) - 19: Compensation for teaching(2) - 20: Compensation during studying and training(2) - 23: Other income - 24: Qualified investment entity (QIE) distributions of capital gains - 25: Trust distributions subject to IRC section 1445 - 26: Unsevered growing crops and timber distributions by a trust subject to IRC section 1445 - 27: Publicly traded partnership distributions subject to IRC section 1446 - 28: Gambling winnings(3) - 32: Notional principal contract income(4) - 35: Substitute payment - other - 36: Capital gains distributions - 37: Return of capital - 38: Eligible deferred compensation items subject to IRC section 877A(d)(1) - 39: Distributions from a nongrantor trust subject to IRC section 877A(f)(1) - 41: Guarantee of indebtedness - 42: Earnings as an artist or athlete - no central withholding agreement(5) - 43: Earnings as an artist or athlete - central withholding agreement(5) - 44: Specified Federal procurement payments - 50: Income previously reported under escrow procedure(6) - 55: Taxable death benefits on life insurance contracts - 57: Amount realized under IRC section 1446(f) - 58: Publicly traded partnership distributions-undetermined | | +|**grossIncome** | **Double** | Gross income | | +|**withholdingIndicator** | [**WithholdingIndicatorEnum**](#WithholdingIndicatorEnum) | Withholding indicator Available values: - 3: Chapter 3 - 4: Chapter 4 | | +|**taxCountryCode** | **String** | Country code | | +|**exemptionCodeChap3** | [**ExemptionCodeChap3Enum**](#ExemptionCodeChap3Enum) | Exemption code (Chapter 3). Required if WithholdingIndicator is 3 (Chapter 3). Required when using TaxRateChap3. Available values: - Empty: Tax rate is due to backup withholding - 00: Not exempt - 01: Effectively connected income - 02: Exempt under IRC (other than portfolio interest) - 03: Income is not from US sources - 04: Exempt under tax treaty - 05: Portfolio interest exempt under IRC - 06: QI that assumes primary withholding responsibility - 07: WFP or WFT - 08: U.S. branch treated as U.S. Person - 09: Territory FI treated as U.S. Person - 10: QI represents that income is exempt - 11: QSL that assumes primary withholding responsibility - 12: Payee subjected to chapter 4 withholding - 22: QDD that assumes primary withholding responsibility - 23: Exempt under section 897(l) - 24: Exempt under section 892 | [optional] | +|**exemptionCodeChap4** | [**ExemptionCodeChap4Enum**](#ExemptionCodeChap4Enum) | Exemption code (Chapter 4). Required if WithholdingIndicator is 4 (Chapter 4). Available values: - 00: Not exempt - 13: Grandfathered payment - 14: Effectively connected income - 15: Payee not subject to chapter 4 withholding - 16: Excluded nonfinancial payment - 17: Foreign Entity that assumes primary withholding responsibility - 18: U.S. Payees - of participating FFI or registered deemed - compliant FFI - 19: Exempt from withholding under IGA(6) - 20: Dormant account(7) - 21: Other - payment not subject to chapter 4 withholding | [optional] | +|**taxRateChap3** | [**TaxRateChap3Enum**](#TaxRateChap3Enum) | Tax rate (Chapter 3) - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 00.00: 0.00% - 02.00: 2.00% - 04.00: 4.00% - 04.90: 4.90% - 04.95: 4.95% - 05.00: 5.00% - 07.00: 7.00% - 08.00: 8.00% - 10.00: 10.00% - 12.00: 12.00% - 12.50: 12.50% - 14.00: 14.00% - 15.00: 15.00% - 17.50: 17.50% - 20.00: 20.00% - 21.00: 21.00% - 24.00: 24.00% - 25.00: 25.00% - 27.50: 27.50% - 28.00: 28.00% - 30.00: 30.00% - 37.00: 37.00% | [optional] | +|**withholdingAllowance** | **Double** | Withholding allowance | [optional] | +|**federalTaxWithheld** | **Double** | Federal tax withheld | [optional] | +|**taxNotDepositedIndicator** | **Boolean** | Tax not deposited indicator | [optional] | +|**academicIndicator** | **Boolean** | Academic indicator | [optional] | +|**taxWithheldOtherAgents** | **Double** | Tax withheld by other agents | [optional] | +|**amountRepaid** | **Double** | Amount repaid to recipient | [optional] | +|**taxPaidAgent** | **Double** | Tax paid by withholding agent | [optional] | +|**chap3StatusCode** | [**Chap3StatusCodeEnum**](#Chap3StatusCodeEnum) | Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3) Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary | [optional] | +|**chap4StatusCode** | [**Chap4StatusCodeEnum**](#Chap4StatusCodeEnum) | Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI | [optional] | +|**primaryWithholdingAgent** | [**PrimaryWithholdingAgent**](PrimaryWithholdingAgent.md) | Primary withholding agent information | [optional] | +|**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThrough**](IntermediaryOrFlowThrough.md) | Intermediary or flow-through entity information | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | Recipient name | | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled for this form | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EMPTY | "Empty" | +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + +## Enum: LobCodeEnum + +| Name | Value | +|---- | -----| +| _01 | "01" | +| _02 | "02" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | + + + +## Enum: IncomeCodeEnum + +| Name | Value | +|---- | -----| +| _01 | "01" | +| _02 | "02" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _22 | "22" | +| _29 | "29" | +| _30 | "30" | +| _31 | "31" | +| _33 | "33" | +| _51 | "51" | +| _54 | "54" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _34 | "34" | +| _40 | "40" | +| _52 | "52" | +| _53 | "53" | +| _56 | "56" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | +| _13 | "13" | +| _14 | "14" | +| _15 | "15" | +| _16 | "16" | +| _17 | "17" | +| _18 | "18" | +| _19 | "19" | +| _20 | "20" | +| _23 | "23" | +| _24 | "24" | +| _25 | "25" | +| _26 | "26" | +| _27 | "27" | +| _28 | "28" | +| _32 | "32" | +| _35 | "35" | +| _36 | "36" | +| _37 | "37" | +| _38 | "38" | +| _39 | "39" | +| _41 | "41" | +| _42 | "42" | +| _43 | "43" | +| _44 | "44" | +| _50 | "50" | +| _55 | "55" | +| _57 | "57" | +| _58 | "58" | + + + +## Enum: WithholdingIndicatorEnum + +| Name | Value | +|---- | -----| +| _3 | "3" | +| _4 | "4" | + + + +## Enum: ExemptionCodeChap3Enum + +| Name | Value | +|---- | -----| +| _00 | "00" | +| _01 | "01" | +| _02 | "02" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | +| _22 | "22" | +| _23 | "23" | +| _24 | "24" | + + + +## Enum: ExemptionCodeChap4Enum + +| Name | Value | +|---- | -----| +| _00 | "00" | +| _13 | "13" | +| _14 | "14" | +| _15 | "15" | +| _16 | "16" | +| _17 | "17" | +| _18 | "18" | +| _19 | "19" | +| _20 | "20" | +| _21 | "21" | + + + +## Enum: TaxRateChap3Enum + +| Name | Value | +|---- | -----| +| _00_00 | "00.00" | +| _02_00 | "02.00" | +| _04_00 | "04.00" | +| _04_90 | "04.90" | +| _04_95 | "04.95" | +| _05_00 | "05.00" | +| _07_00 | "07.00" | +| _08_00 | "08.00" | +| _10_00 | "10.00" | +| _12_00 | "12.00" | +| _12_50 | "12.50" | +| _14_00 | "14.00" | +| _15_00 | "15.00" | +| _17_50 | "17.50" | +| _20_00 | "20.00" | +| _21_00 | "21.00" | +| _24_00 | "24.00" | +| _25_00 | "25.00" | +| _27_50 | "27.50" | +| _28_00 | "28.00" | +| _30_00 | "30.00" | +| _37_00 | "37.00" | + + + +## Enum: Chap3StatusCodeEnum + +| Name | Value | +|---- | -----| +| _01 | "01" | +| _02 | "02" | +| _34 | "34" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | +| _13 | "13" | +| _14 | "14" | +| _15 | "15" | +| _16 | "16" | +| _17 | "17" | +| _18 | "18" | +| _19 | "19" | +| _20 | "20" | +| _21 | "21" | +| _22 | "22" | +| _23 | "23" | +| _24 | "24" | +| _25 | "25" | +| _26 | "26" | +| _27 | "27" | +| _28 | "28" | +| _29 | "29" | +| _30 | "30" | +| _31 | "31" | +| _32 | "32" | +| _35 | "35" | +| _36 | "36" | +| _37 | "37" | +| _38 | "38" | +| _39 | "39" | + + + +## Enum: Chap4StatusCodeEnum + +| Name | Value | +|---- | -----| +| _01 | "01" | +| _02 | "02" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | +| _13 | "13" | +| _14 | "14" | +| _15 | "15" | +| _16 | "16" | +| _17 | "17" | +| _18 | "18" | +| _19 | "19" | +| _20 | "20" | +| _21 | "21" | +| _22 | "22" | +| _23 | "23" | +| _24 | "24" | +| _25 | "25" | +| _26 | "26" | +| _27 | "27" | +| _28 | "28" | +| _29 | "29" | +| _30 | "30" | +| _31 | "31" | +| _32 | "32" | +| _33 | "33" | +| _34 | "34" | +| _35 | "35" | +| _36 | "36" | +| _37 | "37" | +| _38 | "38" | +| _39 | "39" | +| _40 | "40" | +| _41 | "41" | +| _42 | "42" | +| _43 | "43" | +| _44 | "44" | +| _45 | "45" | +| _46 | "46" | +| _47 | "47" | +| _48 | "48" | +| _49 | "49" | +| _50 | "50" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | diff --git a/docs/A1099/V2/Form1095B.md b/docs/A1099/V2/Form1095B.md index b8cadd7..c7fa62f 100644 --- a/docs/A1099/V2/Form1095B.md +++ b/docs/A1099/V2/Form1095B.md @@ -2,52 +2,100 @@ # Form1095B +Form 1095-B: Health Coverage ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**originOfHealthCoverageCode** | **String** | | [optional] | -|**coveredIndividuals** | [**List<CoveredIndividualReference>**](CoveredIndividualReference.md) | | [optional] | -|**id** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**issuerId** | **Integer** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**federalEfile** | **Boolean** | | [optional] | -|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**stateEfile** | **Boolean** | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**referenceId** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**tinType** | **String** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**tin** | **String** | | [optional] | -|**noTin** | **Boolean** | | [optional] | -|**secondTinNotice** | **Boolean** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**nonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | +|**employeeFirstName** | **String** | Employee's first name | | +|**employeeMiddleName** | **String** | Employee's middle name | [optional] | +|**employeeLastName** | **String** | Employee's last name | | +|**employeeNameSuffix** | **String** | Employee's name suffix | [optional] | +|**employeeDateOfBirth** | **LocalDate** | Employee's date of birth | [optional] | +|**originOfHealthCoverageCode** | [**OriginOfHealthCoverageCodeEnum**](#OriginOfHealthCoverageCodeEnum) | Origin of health coverage code Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later) | | +|**coveredIndividuals** | [**List<CoveredIndividual>**](CoveredIndividual.md) | Covered individuals information - At least one month of coverage must be entered if it's not a correction. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | Recipient name | | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number) | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled for this form | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | + + + +## Enum: OriginOfHealthCoverageCodeEnum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EMPTY | "Empty" | +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | diff --git a/docs/A1099/V2/Form1095C.md b/docs/A1099/V2/Form1095C.md new file mode 100644 index 0000000..7a37515 --- /dev/null +++ b/docs/A1099/V2/Form1095C.md @@ -0,0 +1,109 @@ + + +# Form1095C + +Form 1095-C: Employer-Provided Health Insurance Offer and Coverage + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**employeeFirstName** | **String** | Employee's first name | | +|**employeeMiddleName** | **String** | Employee's middle name | [optional] | +|**employeeLastName** | **String** | Employee's last name | | +|**employeeNameSuffix** | **String** | Employee's name suffix | [optional] | +|**recipientDateOfBirth** | **LocalDate** | Recipient's date of birth | [optional] | +|**planStartMonth** | [**PlanStartMonthEnum**](#PlanStartMonthEnum) | Plan start month. The calendar month during which the plan year begins of the health plan in which the employee is offered coverage (or would be offered coverage if the employee were eligible to participate in the plan). Available values: - 00: None - 01: January - 02: February - 03: March - 04: April - 05: May - 06: June - 07: July - 08: August - 09: September - 10: October - 11: November - 12: December | | +|**employerProvidedSiCoverage** | **Boolean** | Employer provided self-insured coverage | [optional] | +|**offerAndCoverages** | [**List<OfferAndCoverage>**](OfferAndCoverage.md) | Offer and coverage information | | +|**coveredIndividuals** | [**List<CoveredIndividual>**](CoveredIndividual.md) | Covered individuals information | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | Recipient name | | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number) | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled for this form | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | + + + +## Enum: PlanStartMonthEnum + +| Name | Value | +|---- | -----| +| _00 | "00" | +| _01 | "01" | +| _02 | "02" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EMPTY | "Empty" | +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + diff --git a/docs/A1099/V2/Form1099Base.md b/docs/A1099/V2/Form1099Base.md index dd5ff7b..4b6f1ce 100644 --- a/docs/A1099/V2/Form1099Base.md +++ b/docs/A1099/V2/Form1099Base.md @@ -7,45 +7,73 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**issuerId** | **Integer** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**federalEfile** | **Boolean** | | [optional] | -|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**stateEfile** | **Boolean** | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**referenceId** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**tinType** | **String** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**tin** | **String** | | [optional] | -|**noTin** | **Boolean** | | [optional] | -|**secondTinNotice** | **Boolean** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**nonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | Recipient name | | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number) | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled for this form | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EMPTY | "Empty" | +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | diff --git a/docs/A1099/V2/Form1099Div.md b/docs/A1099/V2/Form1099Div.md index ac64f8e..68c00e0 100644 --- a/docs/A1099/V2/Form1099Div.md +++ b/docs/A1099/V2/Form1099Div.md @@ -2,68 +2,98 @@ # Form1099Div +Form 1099-DIV: Dividends and Distributions ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalOrdinaryDividends** | **Double** | | [optional] | -|**qualifiedDividends** | **Double** | | [optional] | -|**totalCapitalGainDistributions** | **Double** | | [optional] | -|**unrecapturedSection1250Gain** | **Double** | | [optional] | -|**section1202Gain** | **Double** | | [optional] | -|**collectiblesGain** | **Double** | | [optional] | -|**section897OrdinaryDividends** | **Double** | | [optional] | -|**section897CapitalGain** | **Double** | | [optional] | -|**nondividendDistributions** | **Double** | | [optional] | -|**federalIncomeTaxWithheld** | **Double** | | [optional] | -|**section199ADividends** | **Double** | | [optional] | -|**investmentExpenses** | **Double** | | [optional] | -|**foreignTaxPaid** | **Double** | | [optional] | -|**foreignCountryOrUSPossession** | **String** | | [optional] | -|**cashLiquidationDistributions** | **Double** | | [optional] | -|**noncashLiquidationDistributions** | **Double** | | [optional] | -|**exemptInterestDividends** | **Double** | | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **Double** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**id** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**issuerId** | **Integer** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**federalEfile** | **Boolean** | | [optional] | -|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**stateEfile** | **Boolean** | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**referenceId** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**tinType** | **String** | | [optional] | -|**tin** | **String** | | [optional] | -|**noTin** | **Boolean** | | [optional] | -|**secondTinNotice** | **Boolean** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**nonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | +|**totalOrdinaryDividends** | **Double** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **Double** | Qualified dividends | [optional] | +|**totalCapitalGainDistributions** | **Double** | Total capital gain distributions | [optional] | +|**unrecapturedSection1250Gain** | **Double** | Unrecaptured Section 1250 gain | [optional] | +|**section1202Gain** | **Double** | Section 1202 gain | [optional] | +|**collectiblesGain** | **Double** | Collectibles (28%) gain | [optional] | +|**section897OrdinaryDividends** | **Double** | Section 897 ordinary dividends | [optional] | +|**section897CapitalGain** | **Double** | Section 897 capital gain | [optional] | +|**nondividendDistributions** | **Double** | Nondividend distributions | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**section199ADividends** | **Double** | Section 199A dividends | [optional] | +|**investmentExpenses** | **Double** | Investment expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | +|**foreignCountryOrUSPossession** | **String** | Foreign country or U.S. possession | [optional] | +|**cashLiquidationDistributions** | **Double** | Cash liquidation distributions | [optional] | +|**noncashLiquidationDistributions** | **Double** | Noncash liquidation distributions | [optional] | +|**exemptInterestDividends** | **Double** | Exempt-interest dividends | [optional] | +|**specifiedPrivateActivityBondInterestDividends** | **Double** | Specified private activity bond interest dividends | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | Recipient name | | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number) | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled for this form | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EMPTY | "Empty" | +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | diff --git a/docs/A1099/V2/Form1099Int.md b/docs/A1099/V2/Form1099Int.md index 441c5e5..ebb4cfb 100644 --- a/docs/A1099/V2/Form1099Int.md +++ b/docs/A1099/V2/Form1099Int.md @@ -7,59 +7,88 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**interestIncome** | **Double** | | [optional] | -|**earlyWithdrawalPenalty** | **Double** | | [optional] | -|**usSavingsBondsInterest** | **Double** | | [optional] | -|**federalIncomeTaxWithheld** | **Double** | | [optional] | -|**investmentExpenses** | **Double** | | [optional] | -|**foreignTaxPaid** | **Double** | | [optional] | -|**foreignCountry** | **String** | | [optional] | -|**taxExemptInterest** | **Double** | | [optional] | -|**specifiedPrivateActivityBondInterest** | **Double** | | [optional] | -|**marketDiscount** | **Double** | | [optional] | -|**bondPremium** | **Double** | | [optional] | -|**bondPremiumOnTreasuryObligations** | **Double** | | [optional] | -|**bondPremiumOnTaxExemptBond** | **Double** | | [optional] | -|**taxExemptBondCusipNumber** | **String** | | [optional] | -|**id** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**issuerId** | **Integer** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**federalEfile** | **Boolean** | | [optional] | -|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**stateEfile** | **Boolean** | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**referenceId** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**tinType** | **String** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**tin** | **String** | | [optional] | -|**noTin** | **Boolean** | | [optional] | -|**secondTinNotice** | **Boolean** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**nonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | +|**interestIncome** | **Double** | Interest Income | [optional] | +|**earlyWithdrawalPenalty** | **Double** | Early Withdrawal Penalty | [optional] | +|**usSavingsBondsInterest** | **Double** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**investmentExpenses** | **Double** | Investment Expenses | [optional] | +|**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | +|**foreignCountry** | **String** | Foreign country or U.S. possession | [optional] | +|**taxExemptInterest** | **Double** | Tax-Exempt Interest | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | Specified Private activity | [optional] | +|**marketDiscount** | **Double** | Market Discount | [optional] | +|**bondPremium** | **Double** | Bond Premium | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | Bond Premium on Treasury obligations | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | Bond Premium on tax exempt bond | [optional] | +|**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP no. | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | Recipient name | | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number) | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled for this form | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EMPTY | "Empty" | +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | diff --git a/docs/A1099/V2/Form1099K.md b/docs/A1099/V2/Form1099K.md index c5cff45..72f1112 100644 --- a/docs/A1099/V2/Form1099K.md +++ b/docs/A1099/V2/Form1099K.md @@ -2,70 +2,71 @@ # Form1099K +Form 1099-K: Payment Card and Third Party Network Transactions ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | | [optional] | -|**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | | [optional] | -|**paymentSettlementEntityNamePhoneNumber** | **String** | | [optional] | -|**grossAmountPaymentCard** | **Double** | | [optional] | -|**cardNotPresentTransactions** | **Double** | | [optional] | -|**merchantCategoryCode** | **String** | | [optional] | -|**paymentTransactionNumber** | **Double** | | [optional] | -|**federalIncomeTaxWithheld** | **Double** | | [optional] | -|**january** | **Double** | | [optional] | -|**february** | **Double** | | [optional] | -|**march** | **Double** | | [optional] | -|**april** | **Double** | | [optional] | -|**may** | **Double** | | [optional] | -|**june** | **Double** | | [optional] | -|**july** | **Double** | | [optional] | -|**august** | **Double** | | [optional] | -|**sept** | **Double** | | [optional] | -|**october** | **Double** | | [optional] | -|**november** | **Double** | | [optional] | -|**december** | **Double** | | [optional] | -|**id** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**issuerId** | **Integer** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**federalEfile** | **Boolean** | | [optional] | -|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**stateEfile** | **Boolean** | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**referenceId** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**tinType** | **String** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**tin** | **String** | | [optional] | -|**noTin** | **Boolean** | | [optional] | -|**secondTinNotice** | **Boolean** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**nonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | +|**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | Filer type (PSE or EPF) | [optional] | +|**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | Payment type (payment card or third party network) | [optional] | +|**paymentSettlementEntityNamePhoneNumber** | **String** | Payment settlement entity name and phone number | [optional] | +|**grossAmountPaymentCard** | **Double** | Gross amount of payment card/third party network transactions | [optional] | +|**cardNotPresentTransactions** | **Double** | Card not present transactions | [optional] | +|**merchantCategoryCode** | **String** | Merchant category code | [optional] | +|**paymentTransactionNumber** | **Double** | Number of payment transactions | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**january** | **Double** | January gross payments | [optional] | +|**february** | **Double** | February gross payments | [optional] | +|**march** | **Double** | March gross payments | [optional] | +|**april** | **Double** | April gross payments | [optional] | +|**may** | **Double** | May gross payments | [optional] | +|**june** | **Double** | June gross payments | [optional] | +|**july** | **Double** | July gross payments | [optional] | +|**august** | **Double** | August gross payments | [optional] | +|**september** | **Double** | September gross payments | [optional] | +|**october** | **Double** | October gross payments | [optional] | +|**november** | **Double** | November gross payments | [optional] | +|**december** | **Double** | December gross payments | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | Recipient name | | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number) | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled for this form | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | @@ -88,3 +89,31 @@ +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EMPTY | "Empty" | +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + diff --git a/docs/A1099/V2/Form1099ListRequest.md b/docs/A1099/V2/Form1099ListRequest.md new file mode 100644 index 0000000..be8b894 --- /dev/null +++ b/docs/A1099/V2/Form1099ListRequest.md @@ -0,0 +1,30 @@ + + +# Form1099ListRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**forms** | [**List<Get1099Form200Response>**](Get1099Form200Response.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | + + + diff --git a/docs/A1099/V2/Form1099Misc.md b/docs/A1099/V2/Form1099Misc.md index 5cd260d..f3c0eca 100644 --- a/docs/A1099/V2/Form1099Misc.md +++ b/docs/A1099/V2/Form1099Misc.md @@ -2,64 +2,94 @@ # Form1099Misc +Form 1099-MISC: Miscellaneous Income ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**rents** | **Double** | | [optional] | -|**royalties** | **Double** | | [optional] | -|**otherIncome** | **Double** | | [optional] | -|**fedIncomeTaxWithheld** | **Double** | | [optional] | -|**fishingBoatProceeds** | **Double** | | [optional] | -|**medicalAndHealthCarePayments** | **Double** | | [optional] | -|**substitutePayments** | **Double** | | [optional] | -|**directSalesIndicator** | **Boolean** | | [optional] | -|**cropInsuranceProceeds** | **Double** | | [optional] | -|**excessGoldenParachutePayments** | **Double** | | [optional] | -|**grossProceedsPaidToAttorney** | **Double** | | [optional] | -|**fishPurchasedForResale** | **Double** | | [optional] | -|**section409ADeferrals** | **Double** | | [optional] | -|**nonqualifiedDeferredCompensation** | **Double** | | [optional] | -|**id** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**issuerId** | **Integer** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**federalEfile** | **Boolean** | | [optional] | -|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**stateEfile** | **Boolean** | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**referenceId** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**tinType** | **String** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**tin** | **String** | | [optional] | -|**noTin** | **Boolean** | | [optional] | -|**secondTinNotice** | **Boolean** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**nonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | +|**rents** | **Double** | Rents | [optional] | +|**royalties** | **Double** | Royalties | [optional] | +|**otherIncome** | **Double** | Other income | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**fishingBoatProceeds** | **Double** | Fishing boat proceeds | [optional] | +|**medicalAndHealthCarePayments** | **Double** | Medical and health care payments | [optional] | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**substitutePayments** | **Double** | Substitute payments in lieu of dividends or interest | [optional] | +|**cropInsuranceProceeds** | **Double** | Crop insurance proceeds | [optional] | +|**grossProceedsPaidToAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | +|**fishPurchasedForResale** | **Double** | Fish purchased for resale | [optional] | +|**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | +|**excessGoldenParachutePayments** | **Double** | (Legacy field) Excess golden parachute payments | [optional] | +|**nonqualifiedDeferredCompensation** | **Double** | Nonqualified deferred compensation | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | Recipient name | | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number) | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled for this form | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EMPTY | "Empty" | +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | diff --git a/docs/A1099/V2/Form1099Nec.md b/docs/A1099/V2/Form1099Nec.md index edba895..179b854 100644 --- a/docs/A1099/V2/Form1099Nec.md +++ b/docs/A1099/V2/Form1099Nec.md @@ -7,48 +7,76 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**nonemployeeCompensation** | **Double** | | [optional] | -|**federalIncomeTaxWithheld** | **Double** | | [optional] | -|**directSalesIndicator** | **Boolean** | | [optional] | -|**id** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**issuerId** | **Integer** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**federalEfile** | **Boolean** | | [optional] | -|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**stateEfile** | **Boolean** | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**referenceId** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**tinType** | **String** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**tin** | **String** | | [optional] | -|**noTin** | **Boolean** | | [optional] | -|**secondTinNotice** | **Boolean** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**nonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | +|**nonemployeeCompensation** | **Double** | Nonemployee compensation | | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | Recipient name | | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number) | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled for this form | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EMPTY | "Empty" | +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | diff --git a/docs/A1099/V2/Form1099R.md b/docs/A1099/V2/Form1099R.md index fae524a..e87993c 100644 --- a/docs/A1099/V2/Form1099R.md +++ b/docs/A1099/V2/Form1099R.md @@ -2,69 +2,99 @@ # Form1099R +Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharing Plans, IRAs, Insurance Contracts, etc. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**grossDistributions** | **Double** | | [optional] | -|**taxableAmount** | **Double** | | [optional] | -|**taxableAmountNotDetermined** | **Boolean** | | [optional] | -|**totalDistributionIndicator** | **Boolean** | | [optional] | -|**capitalGain** | **Double** | | [optional] | -|**fedIncomeTaxWithheld** | **Double** | | [optional] | -|**employeeContributions** | **Double** | | [optional] | -|**netUnrealizedAppreciation** | **Double** | | [optional] | -|**distributionCodeRequired** | **String** | | [optional] | -|**distributionCodeOptional** | **String** | | [optional] | -|**iraSepSimpleIndicator** | **Boolean** | | [optional] | -|**totalIraSepSimpleDistribution** | **Double** | | [optional] | -|**other** | **Double** | | [optional] | -|**otherPercent** | **String** | | [optional] | -|**percentageTotalDistribution** | **String** | | [optional] | -|**totalEmployeeContributions** | **Double** | | [optional] | -|**amountAllocableToIrr** | **Double** | | [optional] | -|**firstYearDesignatedRothContrib** | **String** | | [optional] | -|**dateOfPayment** | **String** | | [optional] | -|**id** | **String** | | [optional] | -|**type** | **String** | | [optional] | -|**issuerId** | **Integer** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**federalEfile** | **Boolean** | | [optional] | -|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**stateEfile** | **Boolean** | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | -|**referenceId** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**tinType** | **String** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**tin** | **String** | | [optional] | -|**noTin** | **Boolean** | | [optional] | -|**secondTinNotice** | **Boolean** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**nonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | +|**grossDistribution** | **Double** | Gross distribution | [optional] | +|**taxableAmount** | **Double** | Taxable amount | [optional] | +|**taxableAmountNotDetermined** | **Boolean** | Taxable amount not determined | [optional] | +|**totalDistributionDetermined** | **Boolean** | Total distribution | [optional] | +|**capitalGain** | **Double** | Capital gain (included in Box 2a) | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**employeeContributionsOrDesignatedRothOrInsurancePremiums** | **Double** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | +|**netUnrealizedAppreciationInEmployerSecurities** | **Double** | Net unrealized appreciation in employer's securities | [optional] | +|**distributionCode** | **String** | Distribution code | [optional] | +|**secondDistributionCode** | **String** | Second distribution code | [optional] | +|**iraSepSimple** | **Boolean** | IRA/SEP/SIMPLE | [optional] | +|**traditionalIraSepSimpleOrRothConversionAmount** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | +|**otherAmount** | **Double** | Other amount | [optional] | +|**otherPercentage** | **String** | Other percentage | [optional] | +|**totalDistributionPercentage** | **String** | Total distribution percentage | [optional] | +|**totalEmployeeContributions** | **Double** | Total employee contributions | [optional] | +|**amountAllocableToIrrWithin5Years** | **Double** | Amount allocable to IRR within 5 years | [optional] | +|**firstYearOfDesignatedRothContribution** | **String** | First year of designated Roth contribution | [optional] | +|**dateOfPayment** | **LocalDate** | Date of payment | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | Recipient name | | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number) | [optional] | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled for this form | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EMPTY | "Empty" | +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index 8737dea..98bfe6e 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -1,6 +1,6 @@ # Forms1099Api -All URIs are relative to *https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/avalara1099* +All URIs are relative to *https://api.sbx.avalara.com/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -16,11 +16,11 @@ Method | HTTP request | Description ## bulkUpsert1099Forms -> Form1099ProccessResult bulkUpsert1099Forms(avalaraVersion, dryRun, xCorrelationId, xAvalaraClient, bulkUpsert1099FormsRequest) +> JobResponse bulkUpsert1099Forms(avalaraVersion, dryRun, xCorrelationId, xAvalaraClient, form1099ListRequest) Create or update multiple 1099/1095/W2/1042S forms -This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"587-65-4321\", \"TinType\": \"SSN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"Email\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"NonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalAndHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"DirectSalesIndicator\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"587-65-4321\", \"tinType\": \"SSN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"nonUsProvince\": \"\", \"email\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"directSalesIndicator\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\", \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34, \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. +This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. ### Example @@ -51,12 +51,12 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - Boolean dryRun = false; // Boolean | - String xCorrelationId = "fc005c04-52f7-44d6-bf16-6551603a8324"; // String | Unique correlation Id in a GUID format + Boolean dryRun = false; // Boolean | defaults to false. If true, it will NOT change the DB. It will just return a report of what would've have been changed in the DB + String xCorrelationId = "16e56e1f-e623-4f23-9904-21c29b5b4545"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . - BulkUpsert1099FormsRequest bulkUpsert1099FormsRequest = new BulkUpsert1099FormsRequest(); // BulkUpsert1099FormsRequest | + Form1099ListRequest form1099ListRequest = new Form1099ListRequest(); // Form1099ListRequest | try { - Form1099ProccessResult result = apiInstance.bulkUpsert1099Forms(avalaraVersion, dryRun, xCorrelationId, xAvalaraClient, bulkUpsert1099FormsRequest); + JobResponse result = apiInstance.bulkUpsert1099Forms(avalaraVersion, dryRun, xCorrelationId, xAvalaraClient, form1099ListRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling Forms1099Api#bulkUpsert1099Forms"); @@ -75,14 +75,14 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalaraVersion** | **String**| API version | - **dryRun** | **Boolean**| | [optional] [default to false] + **dryRun** | **Boolean**| defaults to false. If true, it will NOT change the DB. It will just return a report of what would've have been changed in the DB | [optional] [default to false] **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **bulkUpsert1099FormsRequest** | [**BulkUpsert1099FormsRequest**](BulkUpsert1099FormsRequest.md)| | [optional] + **form1099ListRequest** | [**Form1099ListRequest**](Form1099ListRequest.md)| | [optional] ### Return type -[**Form1099ProccessResult**](Form1099ProccessResult.md) +[**JobResponse**](JobResponse.md) ### Authorization @@ -106,7 +106,7 @@ Name | Type | Description | Notes ## create1099Form -> Create1099Form201Response create1099Form(avalaraVersion, xCorrelationId, xAvalaraClient, icreateForm1099Request) +> Get1099Form200Response create1099Form(avalaraVersion, xCorrelationId, xAvalaraClient, get1099Form200Response) Create a 1099/1095/W2/1042S form @@ -141,11 +141,11 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "13eb4eb0-0e7d-41e3-adf3-61b131c1a92c"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "e4a7bf40-da9f-452a-b2db-c8b64721610b"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . - ICreateForm1099Request icreateForm1099Request = new ICreateForm1099Request(); // ICreateForm1099Request | + Get1099Form200Response get1099Form200Response = new Get1099Form200Response(); // Get1099Form200Response | try { - Create1099Form201Response result = apiInstance.create1099Form(avalaraVersion, xCorrelationId, xAvalaraClient, icreateForm1099Request); + Get1099Form200Response result = apiInstance.create1099Form(avalaraVersion, xCorrelationId, xAvalaraClient, get1099Form200Response); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling Forms1099Api#create1099Form"); @@ -166,11 +166,11 @@ Name | Type | Description | Notes **avalaraVersion** | **String**| API version | **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **icreateForm1099Request** | [**ICreateForm1099Request**](ICreateForm1099Request.md)| | [optional] + **get1099Form200Response** | [**Get1099Form200Response**](Get1099Form200Response.md)| | [optional] ### Return type -[**Create1099Form201Response**](Create1099Form201Response.md) +[**Get1099Form200Response**](Get1099Form200Response.md) ### Authorization @@ -229,7 +229,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | The unique identifier of the desired form to delete. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "2bcc9cf0-9638-46d5-a792-be61566e0651"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "8e01e950-8e1c-4b1b-9120-2e2452c6d590"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.delete1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -317,7 +317,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "6e842a03-8b64-4b02-8c5e-7073bf4e8a8c"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "7b8174a3-a873-4a05-a619-f362955f4608"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { Get1099Form200Response result = apiInstance.get1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -406,7 +406,7 @@ public class Example { String id = "id_example"; // String | The ID of the form String avalaraVersion = "2.0.0"; // String | API version Boolean markEdelivered = true; // Boolean | Optional boolean that if set indicates that the form should be marked as having been successfully edelivered - String xCorrelationId = "7b4aa70b-3a10-4fa0-bf19-7592170409b7"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "a4dd3a23-ae45-45a5-8612-75e2fe4c1f36"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { File result = apiInstance.get1099FormPdf(id, avalaraVersion, markEdelivered, xCorrelationId, xAvalaraClient); @@ -459,11 +459,11 @@ Name | Type | Description | Notes ## list1099Forms -> Form1099ListResponse list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, xCorrelationId, xAvalaraClient) +> PaginatedQueryResultModelForm1099Base list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient) List 1099/1095/W2/1042S forms -List 1099/1095/W2/1042S forms. Filterable fields are name, referenceId and taxYear. +List 1099/1095/W2/1042S forms. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: - issuerId - issuerReferenceId - taxYear - addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified - createdAt - edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted - email - federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held - recipientName - mailStatus - possible values are: sent, unscheduled, pending, delivered - referenceId - tinMatchStatus - possible values are: none, pending, matched, failed - type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC - updatedAt - validity - possible values are: true, false For more information on filtering, see <see href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</see>. ### Example @@ -494,14 +494,16 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String $filter = "issuerId eq 884781823"; // String | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: issuerId issuerReferenceId taxYear addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified createdAt edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted email federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held recipientName mailStatus - possible values are: sent, unscheduled, pending, delivered referenceId tinMatchStatus - possible values are: none, pending, matched, failed type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC updatedAt validity - possible values are: true, false - Integer $top = 10; // Integer | If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. - Integer $skip = 0; // Integer | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. - String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example issuerReferenceId ASC. Supported sorting fields are: issuerReferenceId taxYear createdAt recipientName updatedAt - String xCorrelationId = "7766bce5-4834-4907-81e9-dd0fd6c13079"; // String | Unique correlation Id in a GUID format + String $filter = "issuerId eq 884781823"; // String | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. + Integer $top = 56; // Integer | If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. + Integer $skip = 56; // Integer | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. + String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. + Boolean count = true; // Boolean | If true, return the global count of elements in the collection. + Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. + String xCorrelationId = "f808e46a-fc55-4dd7-960d-13c6ba8176f2"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { - Form1099ListResponse result = apiInstance.list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, xCorrelationId, xAvalaraClient); + PaginatedQueryResultModelForm1099Base result = apiInstance.list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling Forms1099Api#list1099Forms"); @@ -520,16 +522,18 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **avalaraVersion** | **String**| API version | - **$filter** | **String**| A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: issuerId issuerReferenceId taxYear addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified createdAt edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted email federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held recipientName mailStatus - possible values are: sent, unscheduled, pending, delivered referenceId tinMatchStatus - possible values are: none, pending, matched, failed type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC updatedAt validity - possible values are: true, false | [optional] - **$top** | **Integer**| If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. | [optional] [default to 10] - **$skip** | **Integer**| If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. | [optional] [default to 0] - **$orderBy** | **String**| A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example issuerReferenceId ASC. Supported sorting fields are: issuerReferenceId taxYear createdAt recipientName updatedAt | [optional] + **$filter** | **String**| A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. | [optional] + **$top** | **Integer**| If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. | [optional] + **$skip** | **Integer**| If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. | [optional] + **$orderBy** | **String**| A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. | [optional] + **count** | **Boolean**| If true, return the global count of elements in the collection. | [optional] + **countOnly** | **Boolean**| If true, return ONLY the global count of elements in the collection. It only applies when count=true. | [optional] **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] ### Return type -[**Form1099ListResponse**](Form1099ListResponse.md) +[**PaginatedQueryResultModelForm1099Base**](PaginatedQueryResultModelForm1099Base.md) ### Authorization @@ -553,7 +557,7 @@ Name | Type | Description | Notes ## update1099Form -> Update1099Form200Response update1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient, iupdateForm1099Request) +> Get1099Form200Response update1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient, get1099Form200Response) Update a 1099/1095/W2/1042S form @@ -589,11 +593,11 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "9f622e4f-7992-4e4f-8e24-e628c5339402"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "944ee583-b810-471c-852c-d3c6f8b93a4b"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . - IUpdateForm1099Request iupdateForm1099Request = new IUpdateForm1099Request(); // IUpdateForm1099Request | + Get1099Form200Response get1099Form200Response = new Get1099Form200Response(); // Get1099Form200Response | try { - Update1099Form200Response result = apiInstance.update1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient, iupdateForm1099Request); + Get1099Form200Response result = apiInstance.update1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient, get1099Form200Response); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling Forms1099Api#update1099Form"); @@ -615,11 +619,11 @@ Name | Type | Description | Notes **avalaraVersion** | **String**| API version | **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **iupdateForm1099Request** | [**IUpdateForm1099Request**](IUpdateForm1099Request.md)| | [optional] + **get1099Form200Response** | [**Get1099Form200Response**](Get1099Form200Response.md)| | [optional] ### Return type -[**Update1099Form200Response**](Update1099Form200Response.md) +[**Get1099Form200Response**](Get1099Form200Response.md) ### Authorization diff --git a/docs/A1099/V2/FormsW9Api.md b/docs/A1099/V2/FormsW9Api.md index c09353d..50476da 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -1,9 +1,10 @@ # FormsW9Api -All URIs are relative to *https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/avalara1099* +All URIs are relative to *https://api.sbx.avalara.com/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- +[**createAndSendW9FormEmail**](FormsW9Api.md#createAndSendW9FormEmail) | **POST** /w9/forms/$create-and-send-email | Create a minimal W9/W4/W8 form and sends the e-mail request [**createW9Form**](FormsW9Api.md#createW9Form) | **POST** /w9/forms | Create a W9/W4/W8 form [**deleteW9Form**](FormsW9Api.md#deleteW9Form) | **DELETE** /w9/forms/{id} | Delete a W9/W4/W8 form [**getW9Form**](FormsW9Api.md#getW9Form) | **GET** /w9/forms/{id} | Retrieve a W9/W4/W8 form @@ -14,6 +15,92 @@ Method | HTTP request | Description +## createAndSendW9FormEmail + +> CreateW9Form201Response createAndSendW9FormEmail(avalaraVersion, xCorrelationId, xAvalaraClient, createAndSendW9FormEmailRequest) + +Create a minimal W9/W4/W8 form and sends the e-mail request + +Create a minimal W9/W4/W8 form and sends the e-mail request. + +### Example + +```java +// Import classes: +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.Configuration; +import Avalara.SDK.auth.*; +import Avalara.SDK.models.*; +import Avalara.SDK.api.A1099.V2.FormsW9Api; + +public class Example { + public static void main(String[] args) { + Configuration configuration = new Configuration(); + configuration.setAppName("Test"); + configuration.setAppVersion("1.0"); + configuration.setMachineName("LocalBox"); + configuration.setTimeout(5000); + configuration.setEnvironment(AvaTaxEnvironment.Sandbox); + // Configure HTTP basic authorization + configuration.setUsername("YOUR USERNAME"); + configuration.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization + configuration.setBearerToken("YOUR ACCESS TOKEN"); + + ApiClient apiClient = new ApiClient(configuration); + + FormsW9Api apiInstance = new FormsW9Api(apiClient); + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "876394c1-80f7-4f02-a857-3899965a96bf"; // String | Unique correlation Id in a GUID format + String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . + CreateAndSendW9FormEmailRequest createAndSendW9FormEmailRequest = new CreateAndSendW9FormEmailRequest(); // CreateAndSendW9FormEmailRequest | Form to be created + try { + CreateW9Form201Response result = apiInstance.createAndSendW9FormEmail(avalaraVersion, xCorrelationId, xAvalaraClient, createAndSendW9FormEmailRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormsW9Api#createAndSendW9FormEmail"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalaraVersion** | **String**| API version | + **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] + **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] + **createAndSendW9FormEmailRequest** | [**CreateAndSendW9FormEmailRequest**](CreateAndSendW9FormEmailRequest.md)| Form to be created | [optional] + +### Return type + +[**CreateW9Form201Response**](CreateW9Form201Response.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: application/json, text/json, application/*+json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The created W9/W4/W8 form | - | +| **400** | Bad request (e.g. Unknown form type: W10\") | - | +| **401** | Authentication failed | - | + + ## createW9Form > CreateW9Form201Response createW9Form(avalaraVersion, xCorrelationId, xAvalaraClient, createW9FormRequest) @@ -51,7 +138,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "d8cc3501-afdd-4b9e-af90-85db9793cbbc"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "4f7d2a74-9904-4300-b8c4-d5eadabea39b"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CreateW9FormRequest createW9FormRequest = new CreateW9FormRequest(); // CreateW9FormRequest | Form to be created try { @@ -138,7 +225,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "0013f0dd-e304-45c6-9f17-bd023626ba48"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "897b8ec0-bd1d-404b-b128-05268ad1823d"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.deleteW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -223,7 +310,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "e76a4eb2-f5f0-4586-888a-c25443f75fc4"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "5aacb16c-2a0a-4896-a0d2-a121f2b5d1d8"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { CreateW9Form201Response result = apiInstance.getW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -314,7 +401,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "8092ac9c-17d0-4ee8-a00e-804088e5ab81"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "779b71e3-fc48-49be-b680-e44e47b3d963"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelW9FormBaseResponse result = apiInstance.listW9Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -364,16 +451,16 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **400** | Bad request (e.g., invalid sort key) | - | | **401** | Authentication failed | - | -| **200** | List of forms | - | +| **200** | list | - | ## sendW9FormEmail -> IW9FormDataModelsOneOf sendW9FormEmail(id, avalaraVersion, xCorrelationId, xAvalaraClient) +> CreateW9Form201Response sendW9FormEmail(id, avalaraVersion, xCorrelationId, xAvalaraClient) Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form -Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. +Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request. ### Example @@ -405,10 +492,10 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | The ID of the W9/W4/W8 form. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "05ca3285-5ab1-43c0-88d7-f23c30428d54"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "8f5afdc6-9616-494f-940c-c66b87b43d27"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { - IW9FormDataModelsOneOf result = apiInstance.sendW9FormEmail(id, avalaraVersion, xCorrelationId, xAvalaraClient); + CreateW9Form201Response result = apiInstance.sendW9FormEmail(id, avalaraVersion, xCorrelationId, xAvalaraClient); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FormsW9Api#sendW9FormEmail"); @@ -433,7 +520,7 @@ Name | Type | Description | Notes ### Return type -[**IW9FormDataModelsOneOf**](IW9FormDataModelsOneOf.md) +[**CreateW9Form201Response**](CreateW9Form201Response.md) ### Authorization @@ -448,7 +535,8 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | The updated W9/W4/W8 form | - | +| **200** | Email sent using existing form (form was already in 'Requested' status or descendant found) | - | +| **201** | Email sent using newly created minimal form | - | | **400** | Bad request (e.g., invalid sort key) | - | | **401** | Authentication failed | - | @@ -491,7 +579,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "87498441-c774-4e3a-864e-dd604bff0d41"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "e0842c54-95c7-488a-882a-ce34cb46e87d"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . IW9FormDataModelsOneOf iw9FormDataModelsOneOf = new IW9FormDataModelsOneOf(); // IW9FormDataModelsOneOf | Form to be updated try { @@ -539,6 +627,7 @@ Name | Type | Description | Notes | **200** | The updated W9/W4/W8 form | - | | **400** | Bad request (e.g., invalid sort key) | - | | **401** | Authentication failed | - | +| **404** | W9/W4/W8 form not found | - | ## uploadW9Files @@ -579,7 +668,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | Id of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "453b7d64-1fd0-4ed3-ba3c-a1d9ca1d69e6"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "ba11f0c0-e9ed-4667-8137-0026b63b63cf"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . File _file = new File("/path/to/file"); // File | try { diff --git a/docs/A1099/V2/Get1099Form200Response.md b/docs/A1099/V2/Get1099Form200Response.md index fbff5a1..142990b 100644 --- a/docs/A1099/V2/Get1099Form200Response.md +++ b/docs/A1099/V2/Get1099Form200Response.md @@ -7,57 +7,19 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | ID of the form | [readonly] | -|**type** | **String** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | | -|**issuerId** | **Integer** | Issuer ID | | -|**issuerReferenceId** | **String** | Issuer Reference ID | [optional] | -|**issuerTin** | **String** | Issuer TIN | [optional] | -|**taxYear** | **Integer** | Tax year | [optional] | -|**federalEfile** | **Boolean** | Boolean indicating that federal e-filing has been scheduled for this form | | -|**federalEfileStatus** | [**StatusDetail**](StatusDetail.md) | Federal e-file status | [optional] [readonly] | -|**stateEfile** | **Boolean** | Boolean indicating that state e-filing has been scheduled for this form | | -|**stateEfileStatus** | [**List<StateEfileStatusDetailResponse>**](StateEfileStatusDetailResponse.md) | State e-file status | [optional] [readonly] | -|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | | -|**postalMailStatus** | [**StatusDetail**](StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | -|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | -|**tinMatchStatus** | [**StatusDetail**](StatusDetail.md) | TIN Match status | [optional] [readonly] | -|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | -|**addressVerificationStatus** | [**StatusDetail**](StatusDetail.md) | Address verification status | [optional] [readonly] | -|**eDeliveryStatus** | [**StatusDetail**](StatusDetail.md) | EDelivery status | [optional] [readonly] | -|**referenceId** | **String** | Reference ID | [optional] | -|**email** | **String** | Recipient email address | [optional] | -|**tinType** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | -|**tin** | **String** | Recipient Tax ID Number | [optional] | -|**noTin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | -|**secondTinNotice** | **Boolean** | Second Tin Notice | [optional] | -|**recipientName** | **String** | Recipient name | [optional] | -|**recipientSecondName** | **String** | Recipient second name | [optional] | -|**address** | **String** | Address | [optional] | -|**address2** | **String** | Address line 2 | [optional] | -|**city** | **String** | City | [optional] | -|**state** | **String** | US state | [optional] | -|**zip** | **String** | Zip/postal code | [optional] | -|**nonUsProvince** | **String** | Foreign province | [optional] | -|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | -|**accountNumber** | **String** | Account Number | [optional] | -|**officeCode** | **String** | Office Code | [optional] | -|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | -|**validationErrors** | [**List<ValidationErrorResponse>**](ValidationErrorResponse.md) | Validation errors | [optional] [readonly] | -|**createdAt** | **OffsetDateTime** | Creation time | [optional] [readonly] | -|**updatedAt** | **OffsetDateTime** | Update time | [optional] [readonly] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] | -|**uniqueFormId** | **String** | Unique form identifier | [optional] | -|**recipientDateOfBirth** | **OffsetDateTime** | Recipient's date of birth | [optional] | -|**recipientGiin** | **String** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] | -|**recipientForeignTin** | **String** | Recipient's foreign TIN | [optional] | -|**lobCode** | **String** | Limitation on benefits code | [optional] | -|**incomeCode** | **String** | Income code | [optional] | -|**grossIncome** | **Double** | Gross income | [optional] | -|**withholdingIndicator** | **String** | Withholding indicator | [optional] | -|**taxCountryCode** | **String** | Country code | [optional] | -|**exemptionCodeChap3** | **String** | Exemption code (Chapter 3) | [optional] | -|**exemptionCodeChap4** | **String** | Exemption code (Chapter 4) | [optional] | -|**taxRateChap3** | **String** | Tax rate (Chapter 3) | [optional] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Type of TIN (Tax ID Number) | [optional] | +|**uniqueFormId** | **String** | Unique form identifier | | +|**recipientDateOfBirth** | **LocalDate** | Recipient's date of birth | [optional] | +|**recipientGiin** | **String** | Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'. | [optional] | +|**recipientForeignTin** | **String** | Recipient's foreign TIN. Required if email is specified, must fill either this or Chap3StatusCode. | [optional] | +|**lobCode** | [**LobCodeEnum**](#LobCodeEnum) | Limitation on Benefits (LOB) code for tax treaty purposes. Available values: - 01: Individual (Deprecated - valid only for tax years prior to 2019) - 02: Government - contracting state/political subdivision/local authority - 03: Tax exempt pension trust/Pension fund - 04: Tax exempt/Charitable organization - 05: Publicly-traded corporation - 06: Subsidiary of publicly-traded corporation - 07: Company that meets the ownership and base erosion test - 08: Company that meets the derivative benefits test - 09: Company with an item of income that meets the active trade or business test - 10: Discretionary determination - 11: Other - 12: No LOB article in treaty | [optional] | +|**incomeCode** | [**IncomeCodeEnum**](#IncomeCodeEnum) | Income code. Available values: Interest: - 01: Interest paid by US obligors - general - 02: Interest paid on real property mortgages - 03: Interest paid to controlling foreign corporations - 04: Interest paid by foreign corporations - 05: Interest on tax-free covenant bonds - 22: Interest paid on deposit with a foreign branch of a domestic corporation or partnership - 29: Deposit interest - 30: Original issue discount (OID) - 31: Short-term OID - 33: Substitute payment - interest - 51: Interest paid on certain actively traded or publicly offered securities(1) - 54: Substitute payments - interest from certain actively traded or publicly offered securities(1) Dividend: - 06: Dividends paid by U.S. corporations - general - 07: Dividends qualifying for direct dividend rate - 08: Dividends paid by foreign corporations - 34: Substitute payment - dividends - 40: Other dividend equivalents under IRC section 871(m) (formerly 871(l)) - 52: Dividends paid on certain actively traded or publicly offered securities(1) - 53: Substitute payments - dividends from certain actively traded or publicly offered securities(1) - 56: Dividend equivalents under IRC section 871(m) as a result of applying the combined transaction rules Other: - 09: Capital gains - 10: Industrial royalties - 11: Motion picture or television copyright royalties - 12: Other royalties (for example, copyright, software, broadcasting, endorsement payments) - 13: Royalties paid on certain publicly offered securities(1) - 14: Real property income and natural resources royalties - 15: Pensions, annuities, alimony, and/or insurance premiums - 16: Scholarship or fellowship grants - 17: Compensation for independent personal services(2) - 18: Compensation for dependent personal services(2) - 19: Compensation for teaching(2) - 20: Compensation during studying and training(2) - 23: Other income - 24: Qualified investment entity (QIE) distributions of capital gains - 25: Trust distributions subject to IRC section 1445 - 26: Unsevered growing crops and timber distributions by a trust subject to IRC section 1445 - 27: Publicly traded partnership distributions subject to IRC section 1446 - 28: Gambling winnings(3) - 32: Notional principal contract income(4) - 35: Substitute payment - other - 36: Capital gains distributions - 37: Return of capital - 38: Eligible deferred compensation items subject to IRC section 877A(d)(1) - 39: Distributions from a nongrantor trust subject to IRC section 877A(f)(1) - 41: Guarantee of indebtedness - 42: Earnings as an artist or athlete - no central withholding agreement(5) - 43: Earnings as an artist or athlete - central withholding agreement(5) - 44: Specified Federal procurement payments - 50: Income previously reported under escrow procedure(6) - 55: Taxable death benefits on life insurance contracts - 57: Amount realized under IRC section 1446(f) - 58: Publicly traded partnership distributions-undetermined | | +|**grossIncome** | **Double** | Gross income | | +|**withholdingIndicator** | [**WithholdingIndicatorEnum**](#WithholdingIndicatorEnum) | Withholding indicator Available values: - 3: Chapter 3 - 4: Chapter 4 | | +|**taxCountryCode** | **String** | Country code | | +|**exemptionCodeChap3** | [**ExemptionCodeChap3Enum**](#ExemptionCodeChap3Enum) | Exemption code (Chapter 3). Required if WithholdingIndicator is 3 (Chapter 3). Required when using TaxRateChap3. Available values: - Empty: Tax rate is due to backup withholding - 00: Not exempt - 01: Effectively connected income - 02: Exempt under IRC (other than portfolio interest) - 03: Income is not from US sources - 04: Exempt under tax treaty - 05: Portfolio interest exempt under IRC - 06: QI that assumes primary withholding responsibility - 07: WFP or WFT - 08: U.S. branch treated as U.S. Person - 09: Territory FI treated as U.S. Person - 10: QI represents that income is exempt - 11: QSL that assumes primary withholding responsibility - 12: Payee subjected to chapter 4 withholding - 22: QDD that assumes primary withholding responsibility - 23: Exempt under section 897(l) - 24: Exempt under section 892 | [optional] | +|**exemptionCodeChap4** | [**ExemptionCodeChap4Enum**](#ExemptionCodeChap4Enum) | Exemption code (Chapter 4). Required if WithholdingIndicator is 4 (Chapter 4). Available values: - 00: Not exempt - 13: Grandfathered payment - 14: Effectively connected income - 15: Payee not subject to chapter 4 withholding - 16: Excluded nonfinancial payment - 17: Foreign Entity that assumes primary withholding responsibility - 18: U.S. Payees - of participating FFI or registered deemed - compliant FFI - 19: Exempt from withholding under IGA(6) - 20: Dormant account(7) - 21: Other - payment not subject to chapter 4 withholding | [optional] | +|**taxRateChap3** | [**TaxRateChap3Enum**](#TaxRateChap3Enum) | Tax rate (Chapter 3) - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 00.00: 0.00% - 02.00: 2.00% - 04.00: 4.00% - 04.90: 4.90% - 04.95: 4.95% - 05.00: 5.00% - 07.00: 7.00% - 08.00: 8.00% - 10.00: 10.00% - 12.00: 12.00% - 12.50: 12.50% - 14.00: 14.00% - 15.00: 15.00% - 17.50: 17.50% - 20.00: 20.00% - 21.00: 21.00% - 24.00: 24.00% - 25.00: 25.00% - 27.50: 27.50% - 28.00: 28.00% - 30.00: 30.00% - 37.00: 37.00% | [optional] | |**withholdingAllowance** | **Double** | Withholding allowance | [optional] | |**federalTaxWithheld** | **Double** | Federal tax withheld | [optional] | |**taxNotDepositedIndicator** | **Boolean** | Tax not deposited indicator | [optional] | @@ -65,12 +27,58 @@ |**taxWithheldOtherAgents** | **Double** | Tax withheld by other agents | [optional] | |**amountRepaid** | **Double** | Amount repaid to recipient | [optional] | |**taxPaidAgent** | **Double** | Tax paid by withholding agent | [optional] | -|**chap3StatusCode** | **String** | Chapter 3 status code | [optional] | -|**chap4StatusCode** | **String** | Chapter 4 status code | [optional] | -|**primaryWithholdingAgent** | [**PrimaryWithholdingAgentResponse**](PrimaryWithholdingAgentResponse.md) | Primary withholding agent information | [optional] | -|**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThroughResponse**](IntermediaryOrFlowThroughResponse.md) | Intermediary or flow-through entity information | [optional] | -|**originOfHealthCoverageCode** | **String** | Origin of health coverage code | [optional] | -|**coveredIndividuals** | [**List<CoveredIndividualReferenceResponse>**](CoveredIndividualReferenceResponse.md) | Covered individuals information | [optional] | +|**chap3StatusCode** | [**Chap3StatusCodeEnum**](#Chap3StatusCodeEnum) | Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3) Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary | [optional] | +|**chap4StatusCode** | [**Chap4StatusCodeEnum**](#Chap4StatusCodeEnum) | Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI | [optional] | +|**primaryWithholdingAgent** | [**PrimaryWithholdingAgent**](PrimaryWithholdingAgent.md) | Primary withholding agent information | [optional] | +|**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThrough**](IntermediaryOrFlowThrough.md) | Intermediary or flow-through entity information | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | Recipient name | | +|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled for this form | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled for this form | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled for this form | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | +|**employeeFirstName** | **String** | Employee's first name | | +|**employeeMiddleName** | **String** | Employee's middle name | [optional] | +|**employeeLastName** | **String** | Employee's last name | | +|**employeeNameSuffix** | **String** | Employee's name suffix | [optional] | +|**employeeDateOfBirth** | **LocalDate** | Employee's date of birth | [optional] | +|**originOfHealthCoverageCode** | [**OriginOfHealthCoverageCodeEnum**](#OriginOfHealthCoverageCodeEnum) | Origin of health coverage code Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later) | | +|**coveredIndividuals** | [**List<CoveredIndividual>**](CoveredIndividual.md) | Covered individuals information | [optional] | +|**planStartMonth** | [**PlanStartMonthEnum**](#PlanStartMonthEnum) | Plan start month. The calendar month during which the plan year begins of the health plan in which the employee is offered coverage (or would be offered coverage if the employee were eligible to participate in the plan). Available values: - 00: None - 01: January - 02: February - 03: March - 04: April - 05: May - 06: June - 07: July - 08: August - 09: September - 10: October - 11: November - 12: December | | +|**employerProvidedSiCoverage** | **Boolean** | Employer provided self-insured coverage | [optional] | +|**offerAndCoverages** | [**List<OfferAndCoverage>**](OfferAndCoverage.md) | Offer and coverage information | | |**totalOrdinaryDividends** | **Double** | Total ordinary dividends | [optional] | |**qualifiedDividends** | **Double** | Qualified dividends | [optional] | |**totalCapitalGainDistributions** | **Double** | Total capital gain distributions | [optional] | @@ -82,24 +90,25 @@ |**nondividendDistributions** | **Double** | Nondividend distributions | [optional] | |**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | |**section199ADividends** | **Double** | Section 199A dividends | [optional] | -|**investmentExpenses** | **Double** | Investment expenses | [optional] | +|**investmentExpenses** | **Double** | Investment Expenses | [optional] | |**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | |**foreignCountryOrUSPossession** | **String** | Foreign country or U.S. possession | [optional] | |**cashLiquidationDistributions** | **Double** | Cash liquidation distributions | [optional] | |**noncashLiquidationDistributions** | **Double** | Noncash liquidation distributions | [optional] | |**exemptInterestDividends** | **Double** | Exempt-interest dividends | [optional] | |**specifiedPrivateActivityBondInterestDividends** | **Double** | Specified private activity bond interest dividends | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | |**interestIncome** | **Double** | Interest Income | [optional] | -|**earlyWithdrawalPenalty** | **Double** | Early withdrawal penalty | [optional] | +|**earlyWithdrawalPenalty** | **Double** | Early Withdrawal Penalty | [optional] | |**usSavingsBondsInterest** | **Double** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | |**foreignCountry** | **String** | Foreign country or U.S. possession | [optional] | -|**taxExemptInterest** | **Double** | Tax-exempt interest | [optional] | -|**specifiedPrivateActivityBondInterest** | **Double** | Specified private activity bond interest | [optional] | -|**marketDiscount** | **Double** | Market discount | [optional] | -|**bondPremium** | **Double** | Bond premium | [optional] | -|**bondPremiumOnTreasuryObligations** | **Double** | Bond premium on Treasury obligations | [optional] | -|**bondPremiumOnTaxExemptBond** | **Double** | Bond premium on tax exempt bond | [optional] | -|**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP number | [optional] | +|**taxExemptInterest** | **Double** | Tax-Exempt Interest | [optional] | +|**specifiedPrivateActivityBondInterest** | **Double** | Specified Private activity | [optional] | +|**marketDiscount** | **Double** | Market Discount | [optional] | +|**bondPremium** | **Double** | Bond Premium | [optional] | +|**bondPremiumOnTreasuryObligations** | **Double** | Bond Premium on Treasury obligations | [optional] | +|**bondPremiumOnTaxExemptBond** | **Double** | Bond Premium on tax exempt bond | [optional] | +|**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP no. | [optional] | |**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | Filer type (PSE or EPF) | [optional] | |**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | Payment type (payment card or third party network) | [optional] | |**paymentSettlementEntityNamePhoneNumber** | **String** | Payment settlement entity name and phone number | [optional] | @@ -115,43 +124,362 @@ |**june** | **Double** | June gross payments | [optional] | |**july** | **Double** | July gross payments | [optional] | |**august** | **Double** | August gross payments | [optional] | -|**sept** | **Double** | September gross payments | [optional] | +|**september** | **Double** | September gross payments | [optional] | |**october** | **Double** | October gross payments | [optional] | |**november** | **Double** | November gross payments | [optional] | |**december** | **Double** | December gross payments | [optional] | |**rents** | **Double** | Rents | [optional] | |**royalties** | **Double** | Royalties | [optional] | |**otherIncome** | **Double** | Other income | [optional] | -|**fedIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | |**fishingBoatProceeds** | **Double** | Fishing boat proceeds | [optional] | |**medicalAndHealthCarePayments** | **Double** | Medical and health care payments | [optional] | -|**substitutePayments** | **Double** | Substitute payments in lieu of dividends or interest | [optional] | |**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**substitutePayments** | **Double** | Substitute payments in lieu of dividends or interest | [optional] | |**cropInsuranceProceeds** | **Double** | Crop insurance proceeds | [optional] | -|**excessGoldenParachutePayments** | **Double** | (Legacy field) Excess golden parachute payments | [optional] | |**grossProceedsPaidToAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | |**fishPurchasedForResale** | **Double** | Fish purchased for resale | [optional] | |**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | +|**excessGoldenParachutePayments** | **Double** | (Legacy field) Excess golden parachute payments | [optional] | |**nonqualifiedDeferredCompensation** | **Double** | Nonqualified deferred compensation | [optional] | -|**nonemployeeCompensation** | **Double** | Nonemployee compensation | [optional] | -|**grossDistributions** | **Double** | Gross distribution | [optional] | +|**nonemployeeCompensation** | **Double** | Nonemployee compensation | | +|**grossDistribution** | **Double** | Gross distribution | [optional] | |**taxableAmount** | **Double** | Taxable amount | [optional] | |**taxableAmountNotDetermined** | **Boolean** | Taxable amount not determined | [optional] | -|**totalDistributionIndicator** | **Boolean** | Total distribution | [optional] | +|**totalDistributionDetermined** | **Boolean** | Total distribution | [optional] | |**capitalGain** | **Double** | Capital gain (included in Box 2a) | [optional] | -|**employeeContributions** | **Double** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | -|**netUnrealizedAppreciation** | **Double** | Net unrealized appreciation in employer's securities | [optional] | -|**distributionCodeRequired** | **String** | Distribution code | [optional] | -|**distributionCodeOptional** | **String** | Second distribution code | [optional] | -|**iraSepSimpleIndicator** | **Boolean** | IRA/SEP/SIMPLE | [optional] | -|**totalIraSepSimpleDistribution** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | -|**other** | **Double** | Other amount | [optional] | -|**otherPercent** | **String** | Other percentage | [optional] | -|**percentageTotalDistribution** | **String** | Total distribution percentage | [optional] | +|**employeeContributionsOrDesignatedRothOrInsurancePremiums** | **Double** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | +|**netUnrealizedAppreciationInEmployerSecurities** | **Double** | Net unrealized appreciation in employer's securities | [optional] | +|**distributionCode** | **String** | Distribution code | [optional] | +|**secondDistributionCode** | **String** | Second distribution code | [optional] | +|**iraSepSimple** | **Boolean** | IRA/SEP/SIMPLE | [optional] | +|**traditionalIraSepSimpleOrRothConversionAmount** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | +|**otherAmount** | **Double** | Other amount | [optional] | +|**otherPercentage** | **String** | Other percentage | [optional] | +|**totalDistributionPercentage** | **String** | Total distribution percentage | [optional] | |**totalEmployeeContributions** | **Double** | Total employee contributions | [optional] | -|**amountAllocableToIrr** | **Double** | Amount allocable to IRR within 5 years | [optional] | -|**firstYearDesignatedRothContrib** | **String** | First year of designated Roth contribution | [optional] | -|**dateOfPayment** | **String** | Date of payment | [optional] | +|**amountAllocableToIrrWithin5Years** | **Double** | Amount allocable to IRR within 5 years | [optional] | +|**firstYearOfDesignatedRothContribution** | **String** | First year of designated Roth contribution | [optional] | +|**dateOfPayment** | **LocalDate** | Date of payment | [optional] | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EMPTY | "Empty" | +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + +## Enum: LobCodeEnum + +| Name | Value | +|---- | -----| +| _01 | "01" | +| _02 | "02" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | + + + +## Enum: IncomeCodeEnum + +| Name | Value | +|---- | -----| +| _01 | "01" | +| _02 | "02" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _22 | "22" | +| _29 | "29" | +| _30 | "30" | +| _31 | "31" | +| _33 | "33" | +| _51 | "51" | +| _54 | "54" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _34 | "34" | +| _40 | "40" | +| _52 | "52" | +| _53 | "53" | +| _56 | "56" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | +| _13 | "13" | +| _14 | "14" | +| _15 | "15" | +| _16 | "16" | +| _17 | "17" | +| _18 | "18" | +| _19 | "19" | +| _20 | "20" | +| _23 | "23" | +| _24 | "24" | +| _25 | "25" | +| _26 | "26" | +| _27 | "27" | +| _28 | "28" | +| _32 | "32" | +| _35 | "35" | +| _36 | "36" | +| _37 | "37" | +| _38 | "38" | +| _39 | "39" | +| _41 | "41" | +| _42 | "42" | +| _43 | "43" | +| _44 | "44" | +| _50 | "50" | +| _55 | "55" | +| _57 | "57" | +| _58 | "58" | + + + +## Enum: WithholdingIndicatorEnum + +| Name | Value | +|---- | -----| +| _3 | "3" | +| _4 | "4" | + + + +## Enum: ExemptionCodeChap3Enum + +| Name | Value | +|---- | -----| +| _00 | "00" | +| _01 | "01" | +| _02 | "02" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | +| _22 | "22" | +| _23 | "23" | +| _24 | "24" | + + + +## Enum: ExemptionCodeChap4Enum + +| Name | Value | +|---- | -----| +| _00 | "00" | +| _13 | "13" | +| _14 | "14" | +| _15 | "15" | +| _16 | "16" | +| _17 | "17" | +| _18 | "18" | +| _19 | "19" | +| _20 | "20" | +| _21 | "21" | + + + +## Enum: TaxRateChap3Enum + +| Name | Value | +|---- | -----| +| _00_00 | "00.00" | +| _02_00 | "02.00" | +| _04_00 | "04.00" | +| _04_90 | "04.90" | +| _04_95 | "04.95" | +| _05_00 | "05.00" | +| _07_00 | "07.00" | +| _08_00 | "08.00" | +| _10_00 | "10.00" | +| _12_00 | "12.00" | +| _12_50 | "12.50" | +| _14_00 | "14.00" | +| _15_00 | "15.00" | +| _17_50 | "17.50" | +| _20_00 | "20.00" | +| _21_00 | "21.00" | +| _24_00 | "24.00" | +| _25_00 | "25.00" | +| _27_50 | "27.50" | +| _28_00 | "28.00" | +| _30_00 | "30.00" | +| _37_00 | "37.00" | + + + +## Enum: Chap3StatusCodeEnum + +| Name | Value | +|---- | -----| +| _01 | "01" | +| _02 | "02" | +| _34 | "34" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | +| _13 | "13" | +| _14 | "14" | +| _15 | "15" | +| _16 | "16" | +| _17 | "17" | +| _18 | "18" | +| _19 | "19" | +| _20 | "20" | +| _21 | "21" | +| _22 | "22" | +| _23 | "23" | +| _24 | "24" | +| _25 | "25" | +| _26 | "26" | +| _27 | "27" | +| _28 | "28" | +| _29 | "29" | +| _30 | "30" | +| _31 | "31" | +| _32 | "32" | +| _35 | "35" | +| _36 | "36" | +| _37 | "37" | +| _38 | "38" | +| _39 | "39" | + + + +## Enum: Chap4StatusCodeEnum + +| Name | Value | +|---- | -----| +| _01 | "01" | +| _02 | "02" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | +| _13 | "13" | +| _14 | "14" | +| _15 | "15" | +| _16 | "16" | +| _17 | "17" | +| _18 | "18" | +| _19 | "19" | +| _20 | "20" | +| _21 | "21" | +| _22 | "22" | +| _23 | "23" | +| _24 | "24" | +| _25 | "25" | +| _26 | "26" | +| _27 | "27" | +| _28 | "28" | +| _29 | "29" | +| _30 | "30" | +| _31 | "31" | +| _32 | "32" | +| _33 | "33" | +| _34 | "34" | +| _35 | "35" | +| _36 | "36" | +| _37 | "37" | +| _38 | "38" | +| _39 | "39" | +| _40 | "40" | +| _41 | "41" | +| _42 | "42" | +| _43 | "43" | +| _44 | "44" | +| _45 | "45" | +| _46 | "46" | +| _47 | "47" | +| _48 | "48" | +| _49 | "49" | +| _50 | "50" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1099_NEC | "1099-NEC" | +| _1099_MISC | "1099-MISC" | +| _1099_DIV | "1099-DIV" | +| _1099_R | "1099-R" | +| _1099_K | "1099-K" | +| _1095_B | "1095-B" | +| _1042_S | "1042-S" | +| _1095_C | "1095-C" | +| _1099_INT | "1099-INT" | + + + +## Enum: OriginOfHealthCoverageCodeEnum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | + + + +## Enum: PlanStartMonthEnum + +| Name | Value | +|---- | -----| +| _00 | "00" | +| _01 | "01" | +| _02 | "02" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | diff --git a/docs/A1099/V2/IntermediaryOrFlowThrough.md b/docs/A1099/V2/IntermediaryOrFlowThrough.md index 344886c..edb1552 100644 --- a/docs/A1099/V2/IntermediaryOrFlowThrough.md +++ b/docs/A1099/V2/IntermediaryOrFlowThrough.md @@ -2,22 +2,23 @@ # IntermediaryOrFlowThrough +Intermediary or flow-through entity information for tax forms ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ein** | **String** | | [optional] | -|**chap3StatusCode** | **String** | | [optional] | -|**chap4StatusCode** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**giin** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**foreignTin** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | +|**ein** | **String** | EIN (Employer Identification Number) of the intermediary or flow-through entity | [optional] | +|**chap3StatusCode** | **String** | Chapter 3 status code for the intermediary or flow-through entity | [optional] | +|**chap4StatusCode** | **String** | Chapter 4 status code for the intermediary or flow-through entity | [optional] | +|**name** | **String** | Name of the intermediary or flow-through entity | [optional] | +|**giin** | **String** | GIIN (Global Intermediary Identification Number) of the intermediary or flow-through entity | [optional] | +|**countryCode** | **String** | Country code for the intermediary or flow-through entity | [optional] | +|**foreignTin** | **String** | Foreign TIN of the intermediary or flow-through entity | [optional] | +|**address** | **String** | Address of the intermediary or flow-through entity | [optional] | +|**city** | **String** | City of the intermediary or flow-through entity | [optional] | +|**state** | **String** | State of the intermediary or flow-through entity | [optional] | +|**zip** | **String** | Zip code of the intermediary or flow-through entity | [optional] | diff --git a/docs/A1099/V2/IssuerCommand.md b/docs/A1099/V2/IssuerCommand.md index 240423c..6d45d44 100644 --- a/docs/A1099/V2/IssuerCommand.md +++ b/docs/A1099/V2/IssuerCommand.md @@ -7,21 +7,21 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | Legal name, not DBA | [optional] | -|**nameDba** | **String** | Optional DBA name or continuation of a long legal name | [optional] | -|**tin** | **String** | Tax identification number | [optional] | -|**referenceId** | **String** | Optional identifier for your reference, never shown to any agency or recipient. We will also prefix download filenames with this value, if present. Can only include letters, numbers, dashes, underscores and spaces. | [optional] | -|**telephone** | **String** | Telephone number | [optional] | -|**taxYear** | **Integer** | Tax year | [optional] | -|**countryCode** | **String** | If there is a transfer agent, use the shipping address of the transfer agent. | [optional] | -|**email** | **String** | Email address | [optional] | -|**address** | **String** | Address | [optional] | -|**city** | **String** | City | [optional] | -|**state** | **String** | State | [optional] | -|**zip** | **String** | Zip code | [optional] | -|**foreignProvince** | **String** | Foreign province | [optional] | -|**transferAgentName** | **String** | Transfer Agent's Name | [optional] | -|**lastFiling** | **Boolean** | Last year of filing for this payer | [optional] | +|**name** | **String** | Legal name. Not the DBA name. | | +|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] | +|**tin** | **String** | Federal Tax Identification Number (TIN). | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] | +|**telephone** | **String** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | | +|**taxYear** | **Integer** | Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. | | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. | [optional] | +|**email** | **String** | Contact email address. For recipient inquiries. | | +|**address** | **String** | Address. | | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | | +|**zip** | **String** | ZIP/postal code. | | +|**foreignProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**transferAgentName** | **String** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] | +|**lastFiling** | **Boolean** | Indicates if this is the issuer's final year filing. | | diff --git a/docs/A1099/V2/IssuerResponse.md b/docs/A1099/V2/IssuerResponse.md index 56a73c3..20dc13a 100644 --- a/docs/A1099/V2/IssuerResponse.md +++ b/docs/A1099/V2/IssuerResponse.md @@ -7,24 +7,24 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | Unique identifier set when the record is created | [optional] [readonly] | -|**name** | **String** | Legal name, not DBA | [optional] | -|**nameDba** | **String** | Optional DBA name or continuation of a long legal name | [optional] | -|**tin** | **String** | Tax identification number | [optional] | -|**referenceId** | **String** | Optional identifier for your reference, never shown to any agency or recipient. We will also prefix download filenames with this value, if present. Can only include letters, numbers, dashes, underscores and spaces. | [optional] | -|**telephone** | **String** | Telephone number | [optional] | -|**taxYear** | **Integer** | Tax year | [optional] | -|**countryCode** | **String** | If there is a transfer agent, use the address of the transfer agent. | [optional] | -|**email** | **String** | Email address | [optional] | -|**address** | **String** | Address | [optional] | -|**city** | **String** | City | [optional] | -|**state** | **String** | State | [optional] | -|**zip** | **String** | Zip code | [optional] | -|**foreignProvince** | **String** | Foreign province | [optional] | -|**transferAgentName** | **String** | Transfer Agent's Name | [optional] | -|**lastFiling** | **Boolean** | Last year of filing for this payer | [optional] | -|**createdAt** | **OffsetDateTime** | Date time when the issuer was created | [optional] [readonly] | -|**updatedAt** | **OffsetDateTime** | Date time when the issuer was updated | [optional] [readonly] | +|**id** | **String** | Unique identifier set when the record is created. | [optional] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] | +|**name** | **String** | Legal name. Not the DBA name. | | +|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] | +|**tin** | **String** | Federal Tax Identification Number (TIN). | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] | +|**telephone** | **String** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | | +|**taxYear** | **Integer** | Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. | | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. | [optional] | +|**email** | **String** | Contact email address. For recipient inquiries. | | +|**address** | **String** | Address. | | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | | +|**zip** | **String** | ZIP/postal code. | | +|**foreignProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**transferAgentName** | **String** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] | +|**lastFiling** | **Boolean** | Indicates if this is the issuer's final year filing. | | diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index 15366ad..24771cb 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -1,6 +1,6 @@ # Issuers1099Api -All URIs are relative to *https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/avalara1099* +All URIs are relative to *https://api.sbx.avalara.com/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -14,7 +14,7 @@ Method | HTTP request | Description ## createIssuer -> IssuerResponse createIssuer(avalaraVersion, xCorrelationId, xAvalaraClient, issuerCommand) +> IssuerResponse createIssuer(avalaraVersion, xCorrelationId, xAvalaraClient, createIssuerRequest) Create an issuer @@ -49,11 +49,11 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "d2b38090-a4c9-4170-bc1d-6cc2778b0bd0"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "26a8ae54-5655-49b3-b01a-f4203094a5ef"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . - IssuerCommand issuerCommand = new IssuerCommand(); // IssuerCommand | The issuer to create + CreateIssuerRequest createIssuerRequest = new CreateIssuerRequest(); // CreateIssuerRequest | The issuer to create try { - IssuerResponse result = apiInstance.createIssuer(avalaraVersion, xCorrelationId, xAvalaraClient, issuerCommand); + IssuerResponse result = apiInstance.createIssuer(avalaraVersion, xCorrelationId, xAvalaraClient, createIssuerRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling Issuers1099Api#createIssuer"); @@ -74,7 +74,7 @@ Name | Type | Description | Notes **avalaraVersion** | **String**| API version | **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **issuerCommand** | [**IssuerCommand**](IssuerCommand.md)| The issuer to create | [optional] + **createIssuerRequest** | [**CreateIssuerRequest**](CreateIssuerRequest.md)| The issuer to create | [optional] ### Return type @@ -136,7 +136,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "22e9dc96-0041-4e27-ab37-038dc9d6c215"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "b8d102b3-3e63-4e6e-9735-25f17b0c69a7"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.deleteIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -221,7 +221,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to retrieve String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "86c9eff5-1ed3-49b1-be09-a117b235f3e2"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "fc90ea70-0e20-46ed-a73c-80e99e89f3d5"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { IssuerResponse result = apiInstance.getIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -312,7 +312,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "0983f292-e1e0-4415-9cdc-b70482da76b0"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "8c33cfd6-f102-4192-9001-24fed7baee29"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelIssuerResponse result = apiInstance.getIssuers(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -369,7 +369,7 @@ Name | Type | Description | Notes ## updateIssuer -> updateIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient, issuerCommand) +> updateIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient, createIssuerRequest) Update an issuer @@ -405,11 +405,11 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "f43f2c52-c35e-4e50-b1ad-2923b624e5a0"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "c353a7ba-0386-49f8-97a8-378cd39452ea"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . - IssuerCommand issuerCommand = new IssuerCommand(); // IssuerCommand | The issuer to update + CreateIssuerRequest createIssuerRequest = new CreateIssuerRequest(); // CreateIssuerRequest | The issuer to update try { - apiInstance.updateIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient, issuerCommand); + apiInstance.updateIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient, createIssuerRequest); } catch (ApiException e) { System.err.println("Exception when calling Issuers1099Api#updateIssuer"); System.err.println("Status code: " + e.getCode()); @@ -430,7 +430,7 @@ Name | Type | Description | Notes **avalaraVersion** | **String**| API version | **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] - **issuerCommand** | [**IssuerCommand**](IssuerCommand.md)| The issuer to update | [optional] + **createIssuerRequest** | [**CreateIssuerRequest**](CreateIssuerRequest.md)| The issuer to update | [optional] ### Return type diff --git a/docs/A1099/V2/JobResponse.md b/docs/A1099/V2/JobResponse.md new file mode 100644 index 0000000..0e9e689 --- /dev/null +++ b/docs/A1099/V2/JobResponse.md @@ -0,0 +1,43 @@ + + +# JobResponse + +Response model for job operations + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier for the job | [optional] | +|**type** | **String** | Job type identifier. Will always be \"update_job\" for bulk upsert operations | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Current status of the job (e.g., Success, Failed, InProgress) | [optional] | +|**errorMessage** | **String** | Error message if the job failed, null otherwise | [optional] | +|**totalProcessed** | **Integer** | Total number of forms processed. Value can be 0 or another value based on what the job has available | [optional] | +|**totalRows** | **Integer** | Total number of forms in the request. Value can be 0 or another value based on what the job has available | [optional] | +|**updatedValid** | **Integer** | Number of forms updated and valid for e-filing and e-delivery. Value can be 0 or another value based on what the job has available | [optional] | +|**updatedNoEmail** | **Integer** | Number of forms updated and valid for e-filing but missing email or email is undeliverable. Value can be 0 or another value based on what the job has available | [optional] | +|**updatedInvalid** | **Integer** | Number of forms updated but invalid for e-filing. Value can be 0 or another value based on what the job has available | [optional] | +|**skippedDuplicate** | **Integer** | Number of forms skipped because they would have updated a record already updated once in the request. Value can be 0 or another value based on what the job has available | [optional] | +|**skippedInvalid** | **Integer** | Number of forms skipped because they would have made a form invalid and the form is already e-filed or scheduled for e-filing. Value can be 0 or another value based on what the job has available | [optional] | +|**skippedMultipleMatches** | **Integer** | Number of forms skipped because they matched multiple forms. Value can be 0 or another value based on what the job has available | [optional] | +|**notFound** | **Integer** | Number of forms skipped because no matching form or issuer could be found. Value can be 0 or another value based on what the job has available | [optional] | +|**createdInvalid** | **Integer** | Number of new forms created because no matching form could be found (and `upsert` was true) - with errors. Value can be 0 or another value based on what the job has available | [optional] | +|**createdNoEmail** | **Integer** | Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing but missing email or email is undeliverable. Value can be 0 or another value based on what the job has available | [optional] | +|**createdValid** | **Integer** | Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing and e-delivery. Value can be 0 or another value based on what the job has available | [optional] | +|**dryRun** | **Boolean** | Dry run. If `true`, this job only simulates the changes but doesn't actually persist them. | [optional] | +|**upsert** | **Boolean** | Upsert. If `true`, this job will first attempt to update existing records if matches can be found. Matches are done in the following order: Form ID, Form Reference ID and tax year, Form TIN and tax year. | [optional] | +|**link** | **String** | Link to access the job details | [optional] | +|**processedForms** | [**List<Get1099Form200Response>**](Get1099Form200Response.md) | List of processed forms returned when bulk-upsert processes ≤1000 records. Same format as GET /1099/forms response. Only available in bulk-upsert endpoint responses. | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| IN_PROGRESS | "InProgress" | +| SUCCESS | "Success" | +| FAILED | "Failed" | + + + diff --git a/docs/A1099/V2/JobsApi.md b/docs/A1099/V2/JobsApi.md new file mode 100644 index 0000000..57b9e23 --- /dev/null +++ b/docs/A1099/V2/JobsApi.md @@ -0,0 +1,97 @@ +# JobsApi + +All URIs are relative to *https://api.sbx.avalara.com/avalara1099* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getJob**](JobsApi.md#getJob) | **GET** /jobs/{id} | Retrieves information about the job + + + +## getJob + +> JobResponse getJob(id, avalaraVersion, xCorrelationId, xAvalaraClient) + +Retrieves information about the job + +Retrieves information about the job + +### Example + +```java +// Import classes: +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.Configuration; +import Avalara.SDK.auth.*; +import Avalara.SDK.models.*; +import Avalara.SDK.api.A1099.V2.JobsApi; + +public class Example { + public static void main(String[] args) { + Configuration configuration = new Configuration(); + configuration.setAppName("Test"); + configuration.setAppVersion("1.0"); + configuration.setMachineName("LocalBox"); + configuration.setTimeout(5000); + configuration.setEnvironment(AvaTaxEnvironment.Sandbox); + // Configure HTTP basic authorization + configuration.setUsername("YOUR USERNAME"); + configuration.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization + configuration.setBearerToken("YOUR ACCESS TOKEN"); + + ApiClient apiClient = new ApiClient(configuration); + + JobsApi apiInstance = new JobsApi(apiClient); + String id = "id_example"; // String | Job id obtained from other API responses, like `/1099/bulk-upsert`. + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "b5e99bb8-41d6-4f87-8677-070497e8fba3"; // String | Unique correlation Id in a GUID format + String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . + try { + JobResponse result = apiInstance.getJob(id, avalaraVersion, xCorrelationId, xAvalaraClient); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#getJob"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Job id obtained from other API responses, like `/1099/bulk-upsert`. | + **avalaraVersion** | **String**| API version | + **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] + **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] + +### Return type + +[**JobResponse**](JobResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **400** | Bad Request | - | +| **404** | Not Found | - | +| **500** | Server Error | - | +| **401** | Unauthorized | - | + diff --git a/docs/A1099/V2/OfferAndCoverage.md b/docs/A1099/V2/OfferAndCoverage.md new file mode 100644 index 0000000..b277d82 --- /dev/null +++ b/docs/A1099/V2/OfferAndCoverage.md @@ -0,0 +1,81 @@ + + +# OfferAndCoverage + +Offer and coverage information for health coverage forms + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | Id | [optional] [readonly] | +|**month** | [**MonthEnum**](#MonthEnum) | Month of coverage. Available values: - All: All months - January: January - February: February - March: March - April: April - May: May - June: June - July: July - August: August - September: September - October: October - November: November - December: December | [optional] | +|**offerCode** | [**OfferCodeEnum**](#OfferCodeEnum) | Offer of Coverage Code. Required if Share has a value, including zero. Available values: Pre-ICHRA Codes (available before 2020): - 1A: Qualifying offer: minimum essential coverage providing minimum value offered to full-time employee with employee required contribution ≤ 9.5% (as adjusted) of mainland single federal poverty line and at least minimum essential coverage offered to spouse and dependent(s) - 1B: Minimum essential coverage providing minimum value offered to employee only - 1C: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to dependent(s) (not spouse) - 1D: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to spouse (not dependent(s)) - 1E: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to dependent(s) and spouse - 1F: Minimum essential coverage NOT providing minimum value offered to employee; employee and spouse or dependent(s); or employee, spouse, and dependents - 1G: Offer of coverage to an individual who was not an employee or not a full-time employee and who enrolled in self-insured coverage - 1H: No offer of coverage (employee not offered any health coverage or employee offered coverage that is not minimum essential coverage) - 1J: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage conditionally offered to spouse; minimum essential coverage not offered to dependent(s) - 1K: Minimum essential coverage providing minimum value offered to employee; at least minimum essential coverage offered to dependents; and at least minimum essential coverage conditionally offered to spouse ICHRA Codes (introduced 2020, require ZIP code): - 1L: Individual coverage HRA offered to employee only - 1M: Individual coverage HRA offered to employee and dependent(s) (not spouse) - 1N: Individual coverage HRA offered to employee, spouse, and dependent(s) - 1O: Individual coverage HRA offered to employee only using employment site ZIP code affordability safe harbor - 1P: Individual coverage HRA offered to employee and dependent(s) (not spouse) using employment site ZIP code affordability safe harbor - 1Q: Individual coverage HRA offered to employee, spouse, and dependent(s) using employment site ZIP code affordability safe harbor - 1R: Individual coverage HRA that is NOT affordable - 1S: Individual coverage HRA offered to an individual who was not a full-time employee - 1T: Individual coverage HRA offered to employee and spouse (not dependents) - 1U: Individual coverage HRA offered to employee and spouse (not dependents) using employment site ZIP code affordability safe harbor Note: Codes 1B, 1C, 1D, 1E, 1J, 1K, 1L, 1M, 1N, 1O, 1P, 1Q, 1T, 1U require employee share amount (0.00 is a valid value). | [optional] | +|**share** | **Double** | Employee required contribution share - Employee Share of Lowest Cost Monthly Premium, for Self-Only Minimum Value Coverage - May not exceed 3499.99 | [optional] | +|**safeHarborCode** | [**SafeHarborCodeEnum**](#SafeHarborCodeEnum) | Safe harbor code - Applicable Section 4980H Safe Harbor Code. Available values: - 2A: Form W-2 safe harbor - 2B: Federal poverty line safe harbor - 2C: Rate of pay safe harbor - 2D: Part-time employee safe harbor for employees who were not full-time for any month of the year - 2E: Multiemployer interim rule relief - 2F: Qualifying offer method - 2G: Qualifying offer transition relief - 2H: Other affordability safe harbor | [optional] | +|**zipCode** | **String** | ZIP/postal code. For coverage area (optional, unless codes 1L to 1U are used). | [optional] | + + + +## Enum: MonthEnum + +| Name | Value | +|---- | -----| +| ALL | "All" | +| _01 | "01" | +| _02 | "02" | +| _03 | "03" | +| _04 | "04" | +| _05 | "05" | +| _06 | "06" | +| _07 | "07" | +| _08 | "08" | +| _09 | "09" | +| _10 | "10" | +| _11 | "11" | +| _12 | "12" | + + + +## Enum: OfferCodeEnum + +| Name | Value | +|---- | -----| +| _1_A | "1A" | +| _1_B | "1B" | +| _1_C | "1C" | +| _1_D | "1D" | +| _1_E | "1E" | +| _1_F | "1F" | +| _1_G | "1G" | +| _1_H | "1H" | +| _1_J | "1J" | +| _1_K | "1K" | +| _1_L | "1L" | +| _1_M | "1M" | +| _1_N | "1N" | +| _1_O | "1O" | +| _1_P | "1P" | +| _1_Q | "1Q" | +| _1_R | "1R" | +| _1_S | "1S" | +| _1_T | "1T" | +| _1_U | "1U" | + + + +## Enum: SafeHarborCodeEnum + +| Name | Value | +|---- | -----| +| _2_A | "2A" | +| _2_B | "2B" | +| _2_C | "2C" | +| _2_D | "2D" | +| _2_E | "2E" | +| _2_F | "2F" | +| _2_G | "2G" | +| _2_H | "2H" | + + + diff --git a/docs/A1099/V2/PaginatedQueryResultModelForm1099Base.md b/docs/A1099/V2/PaginatedQueryResultModelForm1099Base.md new file mode 100644 index 0000000..293c58e --- /dev/null +++ b/docs/A1099/V2/PaginatedQueryResultModelForm1099Base.md @@ -0,0 +1,16 @@ + + +# PaginatedQueryResultModelForm1099Base + +Generic paginated model to wrap query response data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**atRecordsetCount** | **Integer** | | [optional] | +|**value** | [**List<Get1099Form200Response>**](Get1099Form200Response.md) | | [optional] | +|**atNextLink** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/PrimaryWithholdingAgent.md b/docs/A1099/V2/PrimaryWithholdingAgent.md index 95d982b..55e44e0 100644 --- a/docs/A1099/V2/PrimaryWithholdingAgent.md +++ b/docs/A1099/V2/PrimaryWithholdingAgent.md @@ -2,13 +2,14 @@ # PrimaryWithholdingAgent +Primary withholding agent information for tax forms ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**primaryWithholdingAgentName** | **String** | | [optional] | -|**primaryWithholdingAgentEin** | **String** | | [optional] | +|**name** | **String** | Name of the primary withholding agent | | +|**ein** | **String** | EIN (Employer Identification Number) of the primary withholding agent. | | diff --git a/docs/A1099/V2/StateAndLocalWithholding.md b/docs/A1099/V2/StateAndLocalWithholding.md index 15a4737..dd341d4 100644 --- a/docs/A1099/V2/StateAndLocalWithholding.md +++ b/docs/A1099/V2/StateAndLocalWithholding.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**stateTaxWithheld** | **Double** | | [optional] | -|**state** | **String** | | [optional] | -|**stateIdNumber** | **String** | | [optional] | -|**stateIncome** | **Double** | | [optional] | -|**localTaxWithheld** | **Double** | | [optional] | -|**locality** | **String** | | [optional] | -|**localityIdNumber** | **String** | | [optional] | -|**localIncome** | **Double** | | [optional] | +|**stateTaxWithheld** | **Double** | Amount of state tax that was withheld | [optional] | +|**state** | **String** | US state | [optional] | +|**stateIdNumber** | **String** | State ID number of the entity issuing the form | [optional] | +|**stateIncome** | **Double** | Amount of state income | [optional] | +|**localTaxWithheld** | **Double** | Amount of local tax that was withheld | [optional] | +|**locality** | **String** | Locality name | [optional] | +|**localityIdNumber** | **String** | Locality ID number of the entity issuing the form | [optional] | +|**localIncome** | **Double** | Amount of local income | [optional] | diff --git a/docs/A1099/V2/ValidationError.md b/docs/A1099/V2/ValidationError.md index b9c10d2..554e0d5 100644 --- a/docs/A1099/V2/ValidationError.md +++ b/docs/A1099/V2/ValidationError.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**field** | **String** | | [optional] | -|**errors** | **List<String>** | | [optional] | +|**field** | **String** | The field containing the error | [optional] | +|**errors** | **List<String>** | The list of error messages | [optional] | diff --git a/docs/A1099/V2/W4FormMinimalRequest.md b/docs/A1099/V2/W4FormMinimalRequest.md new file mode 100644 index 0000000..53b4610 --- /dev/null +++ b/docs/A1099/V2/W4FormMinimalRequest.md @@ -0,0 +1,31 @@ + + +# W4FormMinimalRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w4\" for this model). | [optional] [readonly] | +|**email** | **String** | The email address of the individual associated with the form. | | +|**employeeFirstName** | **String** | The first name of the employee. | | +|**employeeLastName** | **String** | The last name of the employee. | | +|**officeCode** | **String** | The office code associated with the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/W4FormRequest.md b/docs/A1099/V2/W4FormRequest.md index baa9e97..be7bb7a 100644 --- a/docs/A1099/V2/W4FormRequest.md +++ b/docs/A1099/V2/W4FormRequest.md @@ -27,11 +27,11 @@ |**additionalWithheld** | **Float** | The additional amount withheld. | [optional] | |**exemptFromWithholding** | **Boolean** | Indicates whether the employee is exempt from withholding. | [optional] | |**officeCode** | **String** | The office code associated with the form. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | |**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | |**signature** | **String** | The signature of the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | diff --git a/docs/A1099/V2/W8BenEFormMinimalRequest.md b/docs/A1099/V2/W8BenEFormMinimalRequest.md new file mode 100644 index 0000000..8f066ac --- /dev/null +++ b/docs/A1099/V2/W8BenEFormMinimalRequest.md @@ -0,0 +1,30 @@ + + +# W8BenEFormMinimalRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w8bene\" for this model). | [optional] [readonly] | +|**email** | **String** | The email address of the individual associated with the form. | | +|**name** | **String** | The name of the individual or entity associated with the form. | | +|**referenceNumber** | **String** | A reference number for the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/W8BenEFormRequest.md b/docs/A1099/V2/W8BenEFormRequest.md index 6c67959..1e34b83 100644 --- a/docs/A1099/V2/W8BenEFormRequest.md +++ b/docs/A1099/V2/W8BenEFormRequest.md @@ -103,11 +103,11 @@ |**substantialUsOwners** | [**List<SubstantialUsOwnerRequest>**](SubstantialUsOwnerRequest.md) | The list of substantial U.S. owners of passive NFFE. | [optional] | |**signerName** | **String** | The name of the signer. | [optional] | |**capacityToSignCertification** | **Boolean** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | |**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | |**signature** | **String** | The signature of the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | diff --git a/docs/A1099/V2/W8BenFormMinimalRequest.md b/docs/A1099/V2/W8BenFormMinimalRequest.md new file mode 100644 index 0000000..3ae8335 --- /dev/null +++ b/docs/A1099/V2/W8BenFormMinimalRequest.md @@ -0,0 +1,30 @@ + + +# W8BenFormMinimalRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w8ben\" for this model). | [optional] [readonly] | +|**email** | **String** | The email address of the individual associated with the form. | | +|**name** | **String** | The name of the individual or entity associated with the form. | | +|**referenceNumber** | **String** | A reference number for the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/W8BenFormRequest.md b/docs/A1099/V2/W8BenFormRequest.md index 893d197..9540390 100644 --- a/docs/A1099/V2/W8BenFormRequest.md +++ b/docs/A1099/V2/W8BenFormRequest.md @@ -32,11 +32,11 @@ |**withholdingRate** | **String** | The withholding rate applied as per the treaty. | [optional] | |**incomeType** | **String** | The type of income covered by the treaty. | [optional] | |**signerName** | **String** | The name of the signer of the form. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | |**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | |**signature** | **String** | The signature of the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | diff --git a/docs/A1099/V2/W8ImyFormMinimalRequest.md b/docs/A1099/V2/W8ImyFormMinimalRequest.md new file mode 100644 index 0000000..e4ac22c --- /dev/null +++ b/docs/A1099/V2/W8ImyFormMinimalRequest.md @@ -0,0 +1,30 @@ + + +# W8ImyFormMinimalRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w8imy\" for this model). | [optional] [readonly] | +|**email** | **String** | The email address of the individual associated with the form. | | +|**name** | **String** | The name of the individual or entity associated with the form. | | +|**referenceNumber** | **String** | A reference number for the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/W8ImyFormRequest.md b/docs/A1099/V2/W8ImyFormRequest.md index 0f6000d..8dfefa8 100644 --- a/docs/A1099/V2/W8ImyFormRequest.md +++ b/docs/A1099/V2/W8ImyFormRequest.md @@ -119,11 +119,11 @@ |**sponsoredDirectReportingNffeCertification** | **Boolean** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] | |**directReportingNffeSponsoringEntity** | **String** | The name of the entity that sponsors the direct reporting NFFE. | [optional] | |**signerName** | **String** | The name of the signer. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | |**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | |**signature** | **String** | The signature of the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | diff --git a/docs/A1099/V2/W9FormBaseMinimalRequest.md b/docs/A1099/V2/W9FormBaseMinimalRequest.md new file mode 100644 index 0000000..22794d4 --- /dev/null +++ b/docs/A1099/V2/W9FormBaseMinimalRequest.md @@ -0,0 +1,28 @@ + + +# W9FormBaseMinimalRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type. | [optional] [readonly] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/W9FormBaseRequest.md b/docs/A1099/V2/W9FormBaseRequest.md index 8ce3737..df5103a 100644 --- a/docs/A1099/V2/W9FormBaseRequest.md +++ b/docs/A1099/V2/W9FormBaseRequest.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The form type. | [optional] [readonly] | -|**companyId** | **String** | The ID of the associated company. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | |**referenceId** | **String** | A reference identifier for the form. | [optional] | |**email** | **String** | The email address of the individual associated with the form. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | diff --git a/docs/A1099/V2/W9FormBaseResponse.md b/docs/A1099/V2/W9FormBaseResponse.md index fa56e08..f190691 100644 --- a/docs/A1099/V2/W9FormBaseResponse.md +++ b/docs/A1099/V2/W9FormBaseResponse.md @@ -8,13 +8,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**id** | **String** | The unique identifier for the form. | [optional] | -|**entryStatus** | **String** | The form status. | [optional] | -|**entryStatusDate** | **OffsetDateTime** | The timestamp for the latest status update. | [optional] | +|**entryStatus** | [**EntryStatusResponse**](EntryStatusResponse.md) | The entry status information for the form. | [optional] | |**referenceId** | **String** | A reference identifier for the form. | [optional] | |**companyId** | **String** | The ID of the associated company. | [optional] | |**displayName** | **String** | The display name associated with the form. | [optional] | |**email** | **String** | The email address of the individual associated with the form. | [optional] | |**archived** | **Boolean** | Indicates whether the form is archived. | [optional] | +|**ancestorId** | **String** | Form ID of previous version. | [optional] | |**signature** | **String** | The signature of the form. | [optional] | |**signedDate** | **OffsetDateTime** | The date the form was signed. | [optional] | |**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | diff --git a/docs/A1099/V2/W9FormMinimalRequest.md b/docs/A1099/V2/W9FormMinimalRequest.md new file mode 100644 index 0000000..b264334 --- /dev/null +++ b/docs/A1099/V2/W9FormMinimalRequest.md @@ -0,0 +1,30 @@ + + +# W9FormMinimalRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w9\" for this model). | [optional] [readonly] | +|**email** | **String** | The email address of the individual associated with the form. | | +|**name** | **String** | The name of the individual or entity associated with the form. | | +|**accountNumber** | **String** | The account number associated with the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/W9FormRequest.md b/docs/A1099/V2/W9FormRequest.md index 720e980..e09ed1a 100644 --- a/docs/A1099/V2/W9FormRequest.md +++ b/docs/A1099/V2/W9FormRequest.md @@ -26,11 +26,11 @@ |**tin** | **String** | The taxpayer identification number (TIN). | [optional] | |**backupWithholding** | **Boolean** | Indicates whether backup withholding applies. | [optional] | |**is1099able** | **Boolean** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] | -|**companyId** | **String** | The ID of the associated company. | [optional] | -|**referenceId** | **String** | A reference identifier for the form. | [optional] | -|**email** | **String** | The email address of the individual associated with the form. | [optional] | |**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | |**signature** | **String** | The signature of the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | diff --git a/pom.xml b/pom.xml index 664d9cf..d5c0d01 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ avalara-sdk jar avalara-sdk - 25.8.2 + 25.8.3 https://github.com/avadev/Avalara-SDK-Java OpenAPI Java diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java index 51d3992..8648727 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java @@ -36,9 +36,8 @@ import java.util.*; -import Avalara.SDK.model.A1099.V2.CompanyCreateUpdateRequestModel; import Avalara.SDK.model.A1099.V2.CompanyResponse; -import Avalara.SDK.model.A1099.V2.CompanyResponseModel; +import Avalara.SDK.model.A1099.V2.CreateCompanyRequest; import Avalara.SDK.model.A1099.V2.ErrorModel; import Avalara.SDK.model.A1099.V2.ErrorResponse; import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelCompanyResponse; @@ -111,7 +110,7 @@ public okhttp3.Call createCompanyCall(CreateCompanyRequest requestParameters, fi basePath = null; } - Object localVarPostBody = requestParameters.getCompanyCreateUpdateRequestModel(); + Object localVarPostBody = requestParameters.getCreateCompanyRequest(); // create path and map variables String localVarPath = "/w9/companies"; @@ -138,7 +137,7 @@ public okhttp3.Call createCompanyCall(CreateCompanyRequest requestParameters, fi "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -171,7 +170,7 @@ private okhttp3.Call createCompanyValidateBeforeCall(CreateCompanyRequest reques * Create a company * Create a company. * @param requestOptions Object which represents the options available for a given API/request - * @return CompanyResponseModel + * @return CompanyResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -181,8 +180,8 @@ private okhttp3.Call createCompanyValidateBeforeCall(CreateCompanyRequest reques
401 Authentication failed -
*/ - public CompanyResponseModel createCompany(CreateCompanyRequest requestParameters) throws ApiException { - ApiResponse localVarResp = createCompanyWithHttpInfo(requestParameters); + public CompanyResponse createCompany(CreateCompanyRequest requestParameters) throws ApiException { + ApiResponse localVarResp = createCompanyWithHttpInfo(requestParameters); return localVarResp.getData(); } @@ -190,7 +189,7 @@ public CompanyResponseModel createCompany(CreateCompanyRequest requestParameters * Create a company * Create a company. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CompanyResponseModel> + * @return ApiResponse<CompanyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -200,9 +199,9 @@ public CompanyResponseModel createCompany(CreateCompanyRequest requestParameters
401 Authentication failed -
*/ - public ApiResponse createCompanyWithHttpInfo(CreateCompanyRequest requestParameters) throws ApiException { + public ApiResponse createCompanyWithHttpInfo(CreateCompanyRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = createCompanyValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -221,10 +220,10 @@ public ApiResponse createCompanyWithHttpInfo(CreateCompany 401 Authentication failed - */ - public okhttp3.Call createCompanyAsync(CreateCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createCompanyAsync(CreateCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createCompanyValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -234,13 +233,13 @@ public okhttp3.Call createCompanyAsync(CreateCompanyRequest requestParameters, f * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param companyCreateUpdateRequestModel The company to create (optional) + * @param createCompanyRequest The company to create (optional) */ public class CreateCompanyRequest { private String avalaraVersion; private String xCorrelationId; private String xAvalaraClient; - private CompanyCreateUpdateRequestModel companyCreateUpdateRequestModel; + private CreateCompanyRequest createCompanyRequest; public CreateCompanyRequest () { } @@ -251,8 +250,8 @@ public CreateCompanyRequest () { public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public CompanyCreateUpdateRequestModel getCompanyCreateUpdateRequestModel() { return companyCreateUpdateRequestModel; } - public void setCompanyCreateUpdateRequestModel(CompanyCreateUpdateRequestModel companyCreateUpdateRequestModel) { this.companyCreateUpdateRequestModel = companyCreateUpdateRequestModel; } + public CreateCompanyRequest getCreateCompanyRequest() { return createCompanyRequest; } + public void setCreateCompanyRequest(CreateCompanyRequest createCompanyRequest) { this.createCompanyRequest = createCompanyRequest; } } /** @@ -325,7 +324,7 @@ public okhttp3.Call deleteCompanyCall(DeleteCompanyRequest requestParameters, fi "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -542,7 +541,7 @@ public okhttp3.Call getCompaniesCall(GetCompaniesRequest requestParameters, fina "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -755,7 +754,7 @@ public okhttp3.Call getCompanyCall(GetCompanyRequest requestParameters, final Ap "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -924,7 +923,7 @@ public okhttp3.Call updateCompanyCall(UpdateCompanyRequest requestParameters, fi basePath = null; } - Object localVarPostBody = requestParameters.getCompanyCreateUpdateRequestModel(); + Object localVarPostBody = requestParameters.getCreateCompanyRequest(); // create path and map variables String localVarPath = "/w9/companies/{id}" @@ -952,7 +951,7 @@ public okhttp3.Call updateCompanyCall(UpdateCompanyRequest requestParameters, fi "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -990,7 +989,7 @@ private okhttp3.Call updateCompanyValidateBeforeCall(UpdateCompanyRequest reques * Update a company * Update a company. * @param requestOptions Object which represents the options available for a given API/request - * @return CompanyResponseModel + * @return CompanyResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1001,8 +1000,8 @@ private okhttp3.Call updateCompanyValidateBeforeCall(UpdateCompanyRequest reques
404 Company not found -
*/ - public CompanyResponseModel updateCompany(UpdateCompanyRequest requestParameters) throws ApiException { - ApiResponse localVarResp = updateCompanyWithHttpInfo(requestParameters); + public CompanyResponse updateCompany(UpdateCompanyRequest requestParameters) throws ApiException { + ApiResponse localVarResp = updateCompanyWithHttpInfo(requestParameters); return localVarResp.getData(); } @@ -1010,7 +1009,7 @@ public CompanyResponseModel updateCompany(UpdateCompanyRequest requestParameters * Update a company * Update a company. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CompanyResponseModel> + * @return ApiResponse<CompanyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1021,9 +1020,9 @@ public CompanyResponseModel updateCompany(UpdateCompanyRequest requestParameters
404 Company not found -
*/ - public ApiResponse updateCompanyWithHttpInfo(UpdateCompanyRequest requestParameters) throws ApiException { + public ApiResponse updateCompanyWithHttpInfo(UpdateCompanyRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = updateCompanyValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1043,10 +1042,10 @@ public ApiResponse updateCompanyWithHttpInfo(UpdateCompany 404 Company not found - */ - public okhttp3.Call updateCompanyAsync(UpdateCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCompanyAsync(UpdateCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateCompanyValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1057,14 +1056,14 @@ public okhttp3.Call updateCompanyAsync(UpdateCompanyRequest requestParameters, f * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param companyCreateUpdateRequestModel The updated company data (optional) + * @param createCompanyRequest The updated company data (optional) */ public class UpdateCompanyRequest { private String id; private String avalaraVersion; private String xCorrelationId; private String xAvalaraClient; - private CompanyCreateUpdateRequestModel companyCreateUpdateRequestModel; + private CreateCompanyRequest createCompanyRequest; public UpdateCompanyRequest () { } @@ -1077,8 +1076,8 @@ public UpdateCompanyRequest () { public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public CompanyCreateUpdateRequestModel getCompanyCreateUpdateRequestModel() { return companyCreateUpdateRequestModel; } - public void setCompanyCreateUpdateRequestModel(CompanyCreateUpdateRequestModel companyCreateUpdateRequestModel) { this.companyCreateUpdateRequestModel = companyCreateUpdateRequestModel; } + public CreateCompanyRequest getCreateCompanyRequest() { return createCompanyRequest; } + public void setCreateCompanyRequest(CreateCompanyRequest createCompanyRequest) { this.createCompanyRequest = createCompanyRequest; } } /** @@ -1091,7 +1090,7 @@ public UpdateCompanyRequest getUpdateCompanyRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java index 45840c4..f0e0990 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java @@ -36,16 +36,12 @@ import java.util.*; -import Avalara.SDK.model.A1099.V2.BulkUpsert1099FormsRequest; -import Avalara.SDK.model.A1099.V2.Create1099Form201Response; import Avalara.SDK.model.A1099.V2.ErrorResponse; import java.io.File; -import Avalara.SDK.model.A1099.V2.Form1099ListResponse; -import Avalara.SDK.model.A1099.V2.Form1099ProccessResult; +import Avalara.SDK.model.A1099.V2.Form1099ListRequest; import Avalara.SDK.model.A1099.V2.Get1099Form200Response; -import Avalara.SDK.model.A1099.V2.ICreateForm1099Request; -import Avalara.SDK.model.A1099.V2.IUpdateForm1099Request; -import Avalara.SDK.model.A1099.V2.Update1099Form200Response; +import Avalara.SDK.model.A1099.V2.JobResponse; +import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelForm1099Base; import java.lang.reflect.Type; import java.util.ArrayList; @@ -117,7 +113,7 @@ public okhttp3.Call bulkUpsert1099FormsCall(BulkUpsert1099FormsRequest requestPa basePath = null; } - Object localVarPostBody = requestParameters.getBulkUpsert1099FormsRequest(); + Object localVarPostBody = requestParameters.getForm1099ListRequest(); // create path and map variables String localVarPath = "/1099/forms/$bulk-upsert"; @@ -148,7 +144,7 @@ public okhttp3.Call bulkUpsert1099FormsCall(BulkUpsert1099FormsRequest requestPa "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -179,9 +175,9 @@ private okhttp3.Call bulkUpsert1099FormsValidateBeforeCall(BulkUpsert1099FormsRe /** * Create or update multiple 1099/1095/W2/1042S forms - * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"587-65-4321\", \"TinType\": \"SSN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"Email\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"NonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalAndHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"DirectSalesIndicator\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"587-65-4321\", \"tinType\": \"SSN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"nonUsProvince\": \"\", \"email\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"directSalesIndicator\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\", \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34, \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. + * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. * @param requestOptions Object which represents the options available for a given API/request - * @return Form1099ProccessResult + * @return JobResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -193,16 +189,16 @@ private okhttp3.Call bulkUpsert1099FormsValidateBeforeCall(BulkUpsert1099FormsRe
401 Unauthorized -
*/ - public Form1099ProccessResult bulkUpsert1099Forms(BulkUpsert1099FormsRequest requestParameters) throws ApiException { - ApiResponse localVarResp = bulkUpsert1099FormsWithHttpInfo(requestParameters); + public JobResponse bulkUpsert1099Forms(BulkUpsert1099FormsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = bulkUpsert1099FormsWithHttpInfo(requestParameters); return localVarResp.getData(); } /** * Create or update multiple 1099/1095/W2/1042S forms - * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"587-65-4321\", \"TinType\": \"SSN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"Email\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"NonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalAndHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"DirectSalesIndicator\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"587-65-4321\", \"tinType\": \"SSN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"nonUsProvince\": \"\", \"email\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"directSalesIndicator\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\", \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34, \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. + * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Form1099ProccessResult> + * @return ApiResponse<JobResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -214,15 +210,15 @@ public Form1099ProccessResult bulkUpsert1099Forms(BulkUpsert1099FormsRequest req
401 Unauthorized -
*/ - public ApiResponse bulkUpsert1099FormsWithHttpInfo(BulkUpsert1099FormsRequest requestParameters) throws ApiException { + public ApiResponse bulkUpsert1099FormsWithHttpInfo(BulkUpsert1099FormsRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = bulkUpsert1099FormsValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create or update multiple 1099/1095/W2/1042S forms (asynchronously) - * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"587-65-4321\", \"TinType\": \"SSN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"Email\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"NonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalAndHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"DirectSalesIndicator\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"587-65-4321\", \"tinType\": \"SSN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"nonUsProvince\": \"\", \"email\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"directSalesIndicator\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\", \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34, \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. + * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. * @param requestOptions Object which represents the options available for a given API/request * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -237,10 +233,10 @@ public ApiResponse bulkUpsert1099FormsWithHttpInfo(BulkU 401 Unauthorized - */ - public okhttp3.Call bulkUpsert1099FormsAsync(BulkUpsert1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call bulkUpsert1099FormsAsync(BulkUpsert1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = bulkUpsert1099FormsValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -248,17 +244,17 @@ public okhttp3.Call bulkUpsert1099FormsAsync(BulkUpsert1099FormsRequest requestP * Represents the Request object for the BulkUpsert1099Forms API * * @param avalaraVersion API version - * @param dryRun (optional, default to false) + * @param dryRun defaults to false. If true, it will NOT change the DB. It will just return a report of what would've have been changed in the DB (optional, default to false) * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param bulkUpsert1099FormsRequest (optional) + * @param form1099ListRequest (optional) */ public class BulkUpsert1099FormsRequest { private String avalaraVersion; private Boolean dryRun; private String xCorrelationId; private String xAvalaraClient; - private BulkUpsert1099FormsRequest bulkUpsert1099FormsRequest; + private Form1099ListRequest form1099ListRequest; public BulkUpsert1099FormsRequest () { } @@ -271,8 +267,8 @@ public BulkUpsert1099FormsRequest () { public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public BulkUpsert1099FormsRequest getBulkUpsert1099FormsRequest() { return bulkUpsert1099FormsRequest; } - public void setBulkUpsert1099FormsRequest(BulkUpsert1099FormsRequest bulkUpsert1099FormsRequest) { this.bulkUpsert1099FormsRequest = bulkUpsert1099FormsRequest; } + public Form1099ListRequest getForm1099ListRequest() { return form1099ListRequest; } + public void setForm1099ListRequest(Form1099ListRequest form1099ListRequest) { this.form1099ListRequest = form1099ListRequest; } } /** @@ -316,7 +312,7 @@ public okhttp3.Call create1099FormCall(Create1099FormRequest requestParameters, basePath = null; } - Object localVarPostBody = requestParameters.getIcreateForm1099Request(); + Object localVarPostBody = requestParameters.getGet1099Form200Response(); // create path and map variables String localVarPath = "/1099/forms"; @@ -343,7 +339,7 @@ public okhttp3.Call create1099FormCall(Create1099FormRequest requestParameters, "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -376,7 +372,7 @@ private okhttp3.Call create1099FormValidateBeforeCall(Create1099FormRequest requ * Create a 1099/1095/W2/1042S form * Create a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request - * @return Create1099Form201Response + * @return Get1099Form200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -387,8 +383,8 @@ private okhttp3.Call create1099FormValidateBeforeCall(Create1099FormRequest requ
401 Unauthorized -
*/ - public Create1099Form201Response create1099Form(Create1099FormRequest requestParameters) throws ApiException { - ApiResponse localVarResp = create1099FormWithHttpInfo(requestParameters); + public Get1099Form200Response create1099Form(Create1099FormRequest requestParameters) throws ApiException { + ApiResponse localVarResp = create1099FormWithHttpInfo(requestParameters); return localVarResp.getData(); } @@ -396,7 +392,7 @@ public Create1099Form201Response create1099Form(Create1099FormRequest requestPar * Create a 1099/1095/W2/1042S form * Create a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Create1099Form201Response> + * @return ApiResponse<Get1099Form200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -407,9 +403,9 @@ public Create1099Form201Response create1099Form(Create1099FormRequest requestPar
401 Unauthorized -
*/ - public ApiResponse create1099FormWithHttpInfo(Create1099FormRequest requestParameters) throws ApiException { + public ApiResponse create1099FormWithHttpInfo(Create1099FormRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = create1099FormValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -429,10 +425,10 @@ public ApiResponse create1099FormWithHttpInfo(Create1 401 Unauthorized - */ - public okhttp3.Call create1099FormAsync(Create1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call create1099FormAsync(Create1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = create1099FormValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -442,13 +438,13 @@ public okhttp3.Call create1099FormAsync(Create1099FormRequest requestParameters, * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param icreateForm1099Request (optional) + * @param get1099Form200Response (optional) */ public class Create1099FormRequest { private String avalaraVersion; private String xCorrelationId; private String xAvalaraClient; - private ICreateForm1099Request icreateForm1099Request; + private Get1099Form200Response get1099Form200Response; public Create1099FormRequest () { } @@ -459,8 +455,8 @@ public Create1099FormRequest () { public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public ICreateForm1099Request getIcreateForm1099Request() { return icreateForm1099Request; } - public void setIcreateForm1099Request(ICreateForm1099Request icreateForm1099Request) { this.icreateForm1099Request = icreateForm1099Request; } + public Get1099Form200Response getGet1099Form200Response() { return get1099Form200Response; } + public void setGet1099Form200Response(Get1099Form200Response get1099Form200Response) { this.get1099Form200Response = get1099Form200Response; } } /** @@ -534,7 +530,7 @@ public okhttp3.Call delete1099FormCall(Delete1099FormRequest requestParameters, "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -731,7 +727,7 @@ public okhttp3.Call get1099FormCall(Get1099FormRequest requestParameters, final "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -933,7 +929,7 @@ public okhttp3.Call get1099FormPdfCall(Get1099FormPdfRequest requestParameters, "application/pdf", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1134,6 +1130,14 @@ public okhttp3.Call list1099FormsCall(List1099FormsRequest requestParameters, fi localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderBy", requestParameters.get$orderBy())); } + if (requestParameters.getCount() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); + } + + if (requestParameters.getCountOnly() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); + } + if (requestParameters.getAvalaraVersion() != null) { localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); } @@ -1150,7 +1154,7 @@ public okhttp3.Call list1099FormsCall(List1099FormsRequest requestParameters, fi "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1181,9 +1185,9 @@ private okhttp3.Call list1099FormsValidateBeforeCall(List1099FormsRequest reques /** * List 1099/1095/W2/1042S forms - * List 1099/1095/W2/1042S forms. Filterable fields are name, referenceId and taxYear. + * List 1099/1095/W2/1042S forms. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: - issuerId - issuerReferenceId - taxYear - addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified - createdAt - edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted - email - federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held - recipientName - mailStatus - possible values are: sent, unscheduled, pending, delivered - referenceId - tinMatchStatus - possible values are: none, pending, matched, failed - type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC - updatedAt - validity - possible values are: true, false For more information on filtering, see <see href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</see>. * @param requestOptions Object which represents the options available for a given API/request - * @return Form1099ListResponse + * @return PaginatedQueryResultModelForm1099Base * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1195,16 +1199,16 @@ private okhttp3.Call list1099FormsValidateBeforeCall(List1099FormsRequest reques
401 Unauthorized -
*/ - public Form1099ListResponse list1099Forms(List1099FormsRequest requestParameters) throws ApiException { - ApiResponse localVarResp = list1099FormsWithHttpInfo(requestParameters); + public PaginatedQueryResultModelForm1099Base list1099Forms(List1099FormsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = list1099FormsWithHttpInfo(requestParameters); return localVarResp.getData(); } /** * List 1099/1095/W2/1042S forms - * List 1099/1095/W2/1042S forms. Filterable fields are name, referenceId and taxYear. + * List 1099/1095/W2/1042S forms. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: - issuerId - issuerReferenceId - taxYear - addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified - createdAt - edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted - email - federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held - recipientName - mailStatus - possible values are: sent, unscheduled, pending, delivered - referenceId - tinMatchStatus - possible values are: none, pending, matched, failed - type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC - updatedAt - validity - possible values are: true, false For more information on filtering, see <see href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</see>. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Form1099ListResponse> + * @return ApiResponse<PaginatedQueryResultModelForm1099Base> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1216,15 +1220,15 @@ public Form1099ListResponse list1099Forms(List1099FormsRequest requestParameters
401 Unauthorized -
*/ - public ApiResponse list1099FormsWithHttpInfo(List1099FormsRequest requestParameters) throws ApiException { + public ApiResponse list1099FormsWithHttpInfo(List1099FormsRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = list1099FormsValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List 1099/1095/W2/1042S forms (asynchronously) - * List 1099/1095/W2/1042S forms. Filterable fields are name, referenceId and taxYear. + * List 1099/1095/W2/1042S forms. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: - issuerId - issuerReferenceId - taxYear - addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified - createdAt - edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted - email - federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held - recipientName - mailStatus - possible values are: sent, unscheduled, pending, delivered - referenceId - tinMatchStatus - possible values are: none, pending, matched, failed - type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC - updatedAt - validity - possible values are: true, false For more information on filtering, see <see href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</see>. * @param requestOptions Object which represents the options available for a given API/request * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1239,10 +1243,10 @@ public ApiResponse list1099FormsWithHttpInfo(List1099Forms 401 Unauthorized - */ - public okhttp3.Call list1099FormsAsync(List1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call list1099FormsAsync(List1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = list1099FormsValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1250,10 +1254,12 @@ public okhttp3.Call list1099FormsAsync(List1099FormsRequest requestParameters, f * Represents the Request object for the List1099Forms API * * @param avalaraVersion API version - * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: issuerId issuerReferenceId taxYear addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified createdAt edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted email federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held recipientName mailStatus - possible values are: sent, unscheduled, pending, delivered referenceId tinMatchStatus - possible values are: none, pending, matched, failed type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC updatedAt validity - possible values are: true, false (optional) - * @param $top If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. (optional, default to 10) - * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional, default to 0) - * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example issuerReferenceId ASC. Supported sorting fields are: issuerReferenceId taxYear createdAt recipientName updatedAt (optional) + * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) + * @param $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) + * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) + * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) + * @param count If true, return the global count of elements in the collection. (optional) + * @param countOnly If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) */ @@ -1263,6 +1269,8 @@ public class List1099FormsRequest { private Integer $top; private Integer $skip; private String $orderBy; + private Boolean count; + private Boolean countOnly; private String xCorrelationId; private String xAvalaraClient; @@ -1279,6 +1287,10 @@ public List1099FormsRequest () { public void set$skip(Integer $skip) { this.$skip = $skip; } public String get$orderBy() { return $orderBy; } public void set$orderBy(String $orderBy) { this.$orderBy = $orderBy; } + public Boolean getCount() { return count; } + public void setCount(Boolean count) { this.count = count; } + public Boolean getCountOnly() { return countOnly; } + public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } public String getXCorrelationId() { return xCorrelationId; } public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } public String getXAvalaraClient() { return xAvalaraClient; } @@ -1327,7 +1339,7 @@ public okhttp3.Call update1099FormCall(Update1099FormRequest requestParameters, basePath = null; } - Object localVarPostBody = requestParameters.getIupdateForm1099Request(); + Object localVarPostBody = requestParameters.getGet1099Form200Response(); // create path and map variables String localVarPath = "/1099/forms/{id}" @@ -1355,7 +1367,7 @@ public okhttp3.Call update1099FormCall(Update1099FormRequest requestParameters, "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1393,7 +1405,7 @@ private okhttp3.Call update1099FormValidateBeforeCall(Update1099FormRequest requ * Update a 1099/1095/W2/1042S form * Update a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request - * @return Update1099Form200Response + * @return Get1099Form200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1405,8 +1417,8 @@ private okhttp3.Call update1099FormValidateBeforeCall(Update1099FormRequest requ
401 Unauthorized -
*/ - public Update1099Form200Response update1099Form(Update1099FormRequest requestParameters) throws ApiException { - ApiResponse localVarResp = update1099FormWithHttpInfo(requestParameters); + public Get1099Form200Response update1099Form(Update1099FormRequest requestParameters) throws ApiException { + ApiResponse localVarResp = update1099FormWithHttpInfo(requestParameters); return localVarResp.getData(); } @@ -1414,7 +1426,7 @@ public Update1099Form200Response update1099Form(Update1099FormRequest requestPar * Update a 1099/1095/W2/1042S form * Update a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Update1099Form200Response> + * @return ApiResponse<Get1099Form200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1426,9 +1438,9 @@ public Update1099Form200Response update1099Form(Update1099FormRequest requestPar
401 Unauthorized -
*/ - public ApiResponse update1099FormWithHttpInfo(Update1099FormRequest requestParameters) throws ApiException { + public ApiResponse update1099FormWithHttpInfo(Update1099FormRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = update1099FormValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1449,10 +1461,10 @@ public ApiResponse update1099FormWithHttpInfo(Update1 401 Unauthorized - */ - public okhttp3.Call update1099FormAsync(Update1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call update1099FormAsync(Update1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = update1099FormValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1463,14 +1475,14 @@ public okhttp3.Call update1099FormAsync(Update1099FormRequest requestParameters, * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param iupdateForm1099Request (optional) + * @param get1099Form200Response (optional) */ public class Update1099FormRequest { private String id; private String avalaraVersion; private String xCorrelationId; private String xAvalaraClient; - private IUpdateForm1099Request iupdateForm1099Request; + private Get1099Form200Response get1099Form200Response; public Update1099FormRequest () { } @@ -1483,8 +1495,8 @@ public Update1099FormRequest () { public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public IUpdateForm1099Request getIupdateForm1099Request() { return iupdateForm1099Request; } - public void setIupdateForm1099Request(IUpdateForm1099Request iupdateForm1099Request) { this.iupdateForm1099Request = iupdateForm1099Request; } + public Get1099Form200Response getGet1099Form200Response() { return get1099Form200Response; } + public void setGet1099Form200Response(Get1099Form200Response get1099Form200Response) { this.get1099Form200Response = get1099Form200Response; } } /** @@ -1497,7 +1509,7 @@ public Update1099FormRequest getUpdate1099FormRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java index f845ec3..59b3181 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java @@ -36,6 +36,7 @@ import java.util.*; +import Avalara.SDK.model.A1099.V2.CreateAndSendW9FormEmailRequest; import Avalara.SDK.model.A1099.V2.CreateW9Form201Response; import Avalara.SDK.model.A1099.V2.CreateW9FormRequest; import Avalara.SDK.model.A1099.V2.ErrorModel; @@ -80,6 +81,190 @@ public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } + /** + * Build call for createAndSendW9FormEmail + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ */ + public okhttp3.Call createAndSendW9FormEmailCall(CreateAndSendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = requestParameters.getCreateAndSendW9FormEmailRequest(); + + // create path and map variables + String localVarPath = "/w9/forms/$create-and-send-email"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json", "text/json", "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAndSendW9FormEmailValidateBeforeCall(CreateAndSendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling createAndSendW9FormEmail(Async)"); + } + + + okhttp3.Call localVarCall = createAndSendW9FormEmailCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Create a minimal W9/W4/W8 form and sends the e-mail request + * Create a minimal W9/W4/W8 form and sends the e-mail request. + * @param requestOptions Object which represents the options available for a given API/request + * @return CreateW9Form201Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ */ + public CreateW9Form201Response createAndSendW9FormEmail(CreateAndSendW9FormEmailRequest requestParameters) throws ApiException { + ApiResponse localVarResp = createAndSendW9FormEmailWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Create a minimal W9/W4/W8 form and sends the e-mail request + * Create a minimal W9/W4/W8 form and sends the e-mail request. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CreateW9Form201Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ */ + public ApiResponse createAndSendW9FormEmailWithHttpInfo(CreateAndSendW9FormEmailRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = createAndSendW9FormEmailValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create a minimal W9/W4/W8 form and sends the e-mail request (asynchronously) + * Create a minimal W9/W4/W8 form and sends the e-mail request. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ */ + public okhttp3.Call createAndSendW9FormEmailAsync(CreateAndSendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAndSendW9FormEmailValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the CreateAndSendW9FormEmail API + * + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + * @param createAndSendW9FormEmailRequest Form to be created (optional) + */ + public class CreateAndSendW9FormEmailRequest { + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private CreateAndSendW9FormEmailRequest createAndSendW9FormEmailRequest; + + public CreateAndSendW9FormEmailRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public CreateAndSendW9FormEmailRequest getCreateAndSendW9FormEmailRequest() { return createAndSendW9FormEmailRequest; } + public void setCreateAndSendW9FormEmailRequest(CreateAndSendW9FormEmailRequest createAndSendW9FormEmailRequest) { this.createAndSendW9FormEmailRequest = createAndSendW9FormEmailRequest; } + } + + /** + * Getter function to instantiate Request class + * @returns CreateAndSendW9FormEmailRequest + */ + public CreateAndSendW9FormEmailRequest getCreateAndSendW9FormEmailRequest() { + return this.new CreateAndSendW9FormEmailRequest(); + } + /** * Build call for createW9Form * @param requestOptions Object which represents the options available for a given API/request @@ -139,7 +324,7 @@ public okhttp3.Call createW9FormCall(CreateW9FormRequest requestParameters, fina "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -324,7 +509,7 @@ public okhttp3.Call deleteW9FormCall(DeleteW9FormRequest requestParameters, fina "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -510,7 +695,7 @@ public okhttp3.Call getW9FormCall(GetW9FormRequest requestParameters, final ApiC "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -651,7 +836,7 @@ public GetW9FormRequest getGetW9FormRequest() { Status Code Description Response Headers 400 Bad request (e.g., invalid sort key) - 401 Authentication failed - - 200 List of forms - + 200 list - */ public okhttp3.Call listW9FormsCall(ListW9FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { @@ -723,7 +908,7 @@ public okhttp3.Call listW9FormsCall(ListW9FormsRequest requestParameters, final "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -763,7 +948,7 @@ private okhttp3.Call listW9FormsValidateBeforeCall(ListW9FormsRequest requestPar Status Code Description Response Headers 400 Bad request (e.g., invalid sort key) - 401 Authentication failed - - 200 List of forms - + 200 list - */ public PaginatedQueryResultModelW9FormBaseResponse listW9Forms(ListW9FormsRequest requestParameters) throws ApiException { @@ -782,7 +967,7 @@ public PaginatedQueryResultModelW9FormBaseResponse listW9Forms(ListW9FormsReques Status Code Description Response Headers 400 Bad request (e.g., invalid sort key) - 401 Authentication failed - - 200 List of forms - + 200 list - */ public ApiResponse listW9FormsWithHttpInfo(ListW9FormsRequest requestParameters) throws ApiException { @@ -803,7 +988,7 @@ public ApiResponse listW9FormsWithH Status Code Description Response Headers 400 Bad request (e.g., invalid sort key) - 401 Authentication failed - - 200 List of forms - + 200 list - */ public okhttp3.Call listW9FormsAsync(ListW9FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { @@ -877,7 +1062,8 @@ public ListW9FormsRequest getListW9FormsRequest() { * @http.response.details - + +
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
@@ -928,7 +1114,7 @@ public okhttp3.Call sendW9FormEmailCall(SendW9FormEmailRequest requestParameters "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -964,46 +1150,48 @@ private okhttp3.Call sendW9FormEmailValidateBeforeCall(SendW9FormEmailRequest re /** * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form - * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request. * @param requestOptions Object which represents the options available for a given API/request - * @return IW9FormDataModelsOneOf + * @return CreateW9Form201Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
*/ - public IW9FormDataModelsOneOf sendW9FormEmail(SendW9FormEmailRequest requestParameters) throws ApiException { - ApiResponse localVarResp = sendW9FormEmailWithHttpInfo(requestParameters); + public CreateW9Form201Response sendW9FormEmail(SendW9FormEmailRequest requestParameters) throws ApiException { + ApiResponse localVarResp = sendW9FormEmailWithHttpInfo(requestParameters); return localVarResp.getData(); } /** * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form - * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<IW9FormDataModelsOneOf> + * @return ApiResponse<CreateW9Form201Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
*/ - public ApiResponse sendW9FormEmailWithHttpInfo(SendW9FormEmailRequest requestParameters) throws ApiException { + public ApiResponse sendW9FormEmailWithHttpInfo(SendW9FormEmailRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = sendW9FormEmailValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form (asynchronously) - * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request. * @param requestOptions Object which represents the options available for a given API/request * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1011,15 +1199,16 @@ public ApiResponse sendW9FormEmailWithHttpInfo(SendW9For * @http.response.details - + +
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
*/ - public okhttp3.Call sendW9FormEmailAsync(SendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call sendW9FormEmailAsync(SendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = sendW9FormEmailValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1070,6 +1259,7 @@ public SendW9FormEmailRequest getSendW9FormEmailRequest() { 200 The updated W9/W4/W8 form - 400 Bad request (e.g., invalid sort key) - 401 Authentication failed - + 404 W9/W4/W8 form not found - */ public okhttp3.Call updateW9FormCall(UpdateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { @@ -1118,7 +1308,7 @@ public okhttp3.Call updateW9FormCall(UpdateW9FormRequest requestParameters, fina "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1164,6 +1354,7 @@ private okhttp3.Call updateW9FormValidateBeforeCall(UpdateW9FormRequest requestP 200 The updated W9/W4/W8 form - 400 Bad request (e.g., invalid sort key) - 401 Authentication failed - + 404 W9/W4/W8 form not found - */ public IW9FormDataModelsOneOf updateW9Form(UpdateW9FormRequest requestParameters) throws ApiException { @@ -1183,6 +1374,7 @@ public IW9FormDataModelsOneOf updateW9Form(UpdateW9FormRequest requestParameters 200 The updated W9/W4/W8 form - 400 Bad request (e.g., invalid sort key) - 401 Authentication failed - + 404 W9/W4/W8 form not found - */ public ApiResponse updateW9FormWithHttpInfo(UpdateW9FormRequest requestParameters) throws ApiException { @@ -1204,6 +1396,7 @@ public ApiResponse updateW9FormWithHttpInfo(UpdateW9Form 200 The updated W9/W4/W8 form - 400 Bad request (e.g., invalid sort key) - 401 Authentication failed - + 404 W9/W4/W8 form not found - */ public okhttp3.Call updateW9FormAsync(UpdateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { @@ -1317,7 +1510,7 @@ public okhttp3.Call uploadW9FilesCall(UploadW9FilesRequest requestParameters, fi "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1452,7 +1645,7 @@ public UploadW9FilesRequest getUploadW9FilesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java index d96c3b6..0f84317 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java @@ -36,8 +36,8 @@ import java.util.*; +import Avalara.SDK.model.A1099.V2.CreateIssuerRequest; import Avalara.SDK.model.A1099.V2.ErrorResponse; -import Avalara.SDK.model.A1099.V2.IssuerCommand; import Avalara.SDK.model.A1099.V2.IssuerResponse; import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelIssuerResponse; @@ -109,7 +109,7 @@ public okhttp3.Call createIssuerCall(CreateIssuerRequest requestParameters, fina basePath = null; } - Object localVarPostBody = requestParameters.getIssuerCommand(); + Object localVarPostBody = requestParameters.getCreateIssuerRequest(); // create path and map variables String localVarPath = "/1099/issuers"; @@ -136,7 +136,7 @@ public okhttp3.Call createIssuerCall(CreateIssuerRequest requestParameters, fina "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -232,13 +232,13 @@ public okhttp3.Call createIssuerAsync(CreateIssuerRequest requestParameters, fin * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param issuerCommand The issuer to create (optional) + * @param createIssuerRequest The issuer to create (optional) */ public class CreateIssuerRequest { private String avalaraVersion; private String xCorrelationId; private String xAvalaraClient; - private IssuerCommand issuerCommand; + private CreateIssuerRequest createIssuerRequest; public CreateIssuerRequest () { } @@ -249,8 +249,8 @@ public CreateIssuerRequest () { public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public IssuerCommand getIssuerCommand() { return issuerCommand; } - public void setIssuerCommand(IssuerCommand issuerCommand) { this.issuerCommand = issuerCommand; } + public CreateIssuerRequest getCreateIssuerRequest() { return createIssuerRequest; } + public void setCreateIssuerRequest(CreateIssuerRequest createIssuerRequest) { this.createIssuerRequest = createIssuerRequest; } } /** @@ -321,7 +321,7 @@ public okhttp3.Call deleteIssuerCall(DeleteIssuerRequest requestParameters, fina "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -507,7 +507,7 @@ public okhttp3.Call getIssuerCall(GetIssuerRequest requestParameters, final ApiC "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -722,7 +722,7 @@ public okhttp3.Call getIssuersCall(GetIssuersRequest requestParameters, final Ap "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -906,7 +906,7 @@ public okhttp3.Call updateIssuerCall(UpdateIssuerRequest requestParameters, fina basePath = null; } - Object localVarPostBody = requestParameters.getIssuerCommand(); + Object localVarPostBody = requestParameters.getCreateIssuerRequest(); // create path and map variables String localVarPath = "/1099/issuers/{id}" @@ -934,7 +934,7 @@ public okhttp3.Call updateIssuerCall(UpdateIssuerRequest requestParameters, fina "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1035,14 +1035,14 @@ public okhttp3.Call updateIssuerAsync(UpdateIssuerRequest requestParameters, fin * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param issuerCommand The issuer to update (optional) + * @param createIssuerRequest The issuer to update (optional) */ public class UpdateIssuerRequest { private String id; private String avalaraVersion; private String xCorrelationId; private String xAvalaraClient; - private IssuerCommand issuerCommand; + private CreateIssuerRequest createIssuerRequest; public UpdateIssuerRequest () { } @@ -1055,8 +1055,8 @@ public UpdateIssuerRequest () { public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public IssuerCommand getIssuerCommand() { return issuerCommand; } - public void setIssuerCommand(IssuerCommand issuerCommand) { this.issuerCommand = issuerCommand; } + public CreateIssuerRequest getCreateIssuerRequest() { return createIssuerRequest; } + public void setCreateIssuerRequest(CreateIssuerRequest createIssuerRequest) { this.createIssuerRequest = createIssuerRequest; } } /** @@ -1069,7 +1069,7 @@ public UpdateIssuerRequest getUpdateIssuerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/Jobs1099Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java similarity index 93% rename from src/main/java/Avalara/SDK/api/A1099/V2/Jobs1099Api.java rename to src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java index 2d09c2a..063d99d 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Jobs1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java @@ -37,7 +37,7 @@ import Avalara.SDK.model.A1099.V2.ErrorResponse; -import Avalara.SDK.model.A1099.V2.JobResult; +import Avalara.SDK.model.A1099.V2.JobResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -45,12 +45,12 @@ import java.util.List; import java.util.Map; -public class Jobs1099Api { +public class JobsApi { private ApiClient localVarApiClient; private int localHostIndex; private String localCustomBaseUrl; - public Jobs1099Api(ApiClient apiClient) { + public JobsApi(ApiClient apiClient) { this.localVarApiClient = apiClient; SetConfiguration(apiClient); } @@ -112,7 +112,7 @@ public okhttp3.Call getJobCall(GetJobRequest requestParameters, final ApiCallbac Object localVarPostBody = null; // create path and map variables - String localVarPath = "/1099/jobs/{id}" + String localVarPath = "/jobs/{id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); List localVarQueryParams = new ArrayList(); @@ -137,7 +137,7 @@ public okhttp3.Call getJobCall(GetJobRequest requestParameters, final ApiCallbac "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -175,7 +175,7 @@ private okhttp3.Call getJobValidateBeforeCall(GetJobRequest requestParameters, f * Retrieves information about the job * Retrieves information about the job * @param requestOptions Object which represents the options available for a given API/request - * @return JobResult + * @return JobResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -187,8 +187,8 @@ private okhttp3.Call getJobValidateBeforeCall(GetJobRequest requestParameters, f
401 Unauthorized -
*/ - public JobResult getJob(GetJobRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getJobWithHttpInfo(requestParameters); + public JobResponse getJob(GetJobRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getJobWithHttpInfo(requestParameters); return localVarResp.getData(); } @@ -196,7 +196,7 @@ public JobResult getJob(GetJobRequest requestParameters) throws ApiException { * Retrieves information about the job * Retrieves information about the job * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<JobResult> + * @return ApiResponse<JobResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -208,9 +208,9 @@ public JobResult getJob(GetJobRequest requestParameters) throws ApiException {
401 Unauthorized -
*/ - public ApiResponse getJobWithHttpInfo(GetJobRequest requestParameters) throws ApiException { + public ApiResponse getJobWithHttpInfo(GetJobRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = getJobValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -231,10 +231,10 @@ public ApiResponse getJobWithHttpInfo(GetJobRequest requestParameters 401 Unauthorized - */ - public okhttp3.Call getJobAsync(GetJobRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getJobAsync(GetJobRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getJobValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -275,7 +275,7 @@ public GetJobRequest getGetJobRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java index 73a00e4..bf1883f 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java @@ -152,7 +152,7 @@ public okhttp3.Call getDataInputFieldsCall(GetDataInputFieldsRequest requestPara "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -294,7 +294,7 @@ public GetDataInputFieldsRequest getGetDataInputFieldsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java index 531d0e6..2100ede 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java @@ -149,7 +149,7 @@ public okhttp3.Call downloadDocumentCall(DownloadDocumentRequest requestParamete "application/pdf", "application/xml", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -346,7 +346,7 @@ public okhttp3.Call fetchDocumentsCall(FetchDocumentsRequest requestParameters, "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -563,7 +563,7 @@ public okhttp3.Call getDocumentListCall(GetDocumentListRequest requestParameters "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -772,7 +772,7 @@ public okhttp3.Call getDocumentStatusCall(GetDocumentStatusRequest requestParame "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -965,7 +965,7 @@ public okhttp3.Call submitDocumentCall(SubmitDocumentRequest requestParameters, "application/json", "text/xml" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1105,7 +1105,7 @@ public SubmitDocumentRequest getSubmitDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java index d133bde..1e8659e 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java @@ -149,7 +149,7 @@ public okhttp3.Call submitInteropDocumentCall(SubmitInteropDocumentRequest reque "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -300,7 +300,7 @@ public SubmitInteropDocumentRequest getSubmitInteropDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java index ead2247..4672dfd 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java @@ -146,7 +146,7 @@ public okhttp3.Call getMandateDataInputFieldsCall(GetMandateDataInputFieldsReque "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -376,7 +376,7 @@ public okhttp3.Call getMandatesCall(GetMandatesRequest requestParameters, final "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -521,7 +521,7 @@ public GetMandatesRequest getGetMandatesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java index af363c5..25a1e9c 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java @@ -138,7 +138,7 @@ public okhttp3.Call createWebhookSubscriptionCall(CreateWebhookSubscriptionReque "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -332,7 +332,7 @@ public okhttp3.Call deleteWebhookSubscriptionCall(DeleteWebhookSubscriptionReque "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -522,7 +522,7 @@ public okhttp3.Call getWebhookSubscriptionCall(GetWebhookSubscriptionRequest req "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -731,7 +731,7 @@ public okhttp3.Call listWebhookSubscriptionsCall(ListWebhookSubscriptionsRequest "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -873,7 +873,7 @@ public ListWebhookSubscriptionsRequest getListWebhookSubscriptionsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java index 984fd9c..b5e2c83 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java @@ -146,7 +146,7 @@ public okhttp3.Call taxIdentifierSchemaByCountryCall(TaxIdentifierSchemaByCountr "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -348,7 +348,7 @@ public okhttp3.Call validateTaxIdentifierCall(ValidateTaxIdentifierRequest reque "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -489,7 +489,7 @@ public ValidateTaxIdentifierRequest getValidateTaxIdentifierRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java index 4074d60..1609bdd 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java @@ -157,7 +157,7 @@ public okhttp3.Call batchSearchParticipantsCall(BatchSearchParticipantsRequest r "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -373,7 +373,7 @@ public okhttp3.Call createTradingPartnerCall(CreateTradingPartnerRequest request "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -575,7 +575,7 @@ public okhttp3.Call createTradingPartnersBatchCall(CreateTradingPartnersBatchReq "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -779,7 +779,7 @@ public okhttp3.Call deleteTradingPartnerCall(DeleteTradingPartnerRequest request "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -973,7 +973,7 @@ public okhttp3.Call downloadBatchSearchReportCall(DownloadBatchSearchReportReque "text/csv", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1171,7 +1171,7 @@ public okhttp3.Call getBatchSearchDetailCall(GetBatchSearchDetailRequest request "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1388,7 +1388,7 @@ public okhttp3.Call listBatchSearchesCall(ListBatchSearchesRequest requestParame "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1620,7 +1620,7 @@ public okhttp3.Call searchParticipantsCall(SearchParticipantsRequest requestPara "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1840,7 +1840,7 @@ public okhttp3.Call updateTradingPartnerCall(UpdateTradingPartnerRequest request "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1993,7 +1993,7 @@ public UpdateTradingPartnerRequest getUpdateTradingPartnerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.8.2"); + this.localVarApiClient.setSdkVersion("25.8.3"); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Attribute.java b/src/main/java/Avalara/SDK/model/A1099/V2/Attribute.java deleted file mode 100644 index 7f0117f..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Attribute.java +++ /dev/null @@ -1,663 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Attribute - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Attribute { - public static final String SERIALIZED_NAME_DRY_RUN = "dryRun"; - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; - - public static final String SERIALIZED_NAME_UPSERT = "upsert"; - @SerializedName(SERIALIZED_NAME_UPSERT) - private Boolean upsert; - - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - IN_PROGRESS("InProgress"), - - SUCCESS("Success"), - - FAILED("Failed"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - StatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; - - public static final String SERIALIZED_NAME_ERROR_MESSAGE = "errorMessage"; - @SerializedName(SERIALIZED_NAME_ERROR_MESSAGE) - private String errorMessage; - - public static final String SERIALIZED_NAME_TOTAL_PROCESSED = "totalProcessed"; - @SerializedName(SERIALIZED_NAME_TOTAL_PROCESSED) - private Integer totalProcessed; - - public static final String SERIALIZED_NAME_TOTAL_ROWS = "totalRows"; - @SerializedName(SERIALIZED_NAME_TOTAL_ROWS) - private Integer totalRows; - - public static final String SERIALIZED_NAME_UPDATED_VALID = "updatedValid"; - @SerializedName(SERIALIZED_NAME_UPDATED_VALID) - private Integer updatedValid; - - public static final String SERIALIZED_NAME_UPDATED_NO_EMAIL = "updatedNoEmail"; - @SerializedName(SERIALIZED_NAME_UPDATED_NO_EMAIL) - private Integer updatedNoEmail; - - public static final String SERIALIZED_NAME_UPDATED_INVALID = "updatedInvalid"; - @SerializedName(SERIALIZED_NAME_UPDATED_INVALID) - private Integer updatedInvalid; - - public static final String SERIALIZED_NAME_SKIPPED_DUPLICATE = "skippedDuplicate"; - @SerializedName(SERIALIZED_NAME_SKIPPED_DUPLICATE) - private Integer skippedDuplicate; - - public static final String SERIALIZED_NAME_SKIPPED_INVALID = "skippedInvalid"; - @SerializedName(SERIALIZED_NAME_SKIPPED_INVALID) - private Integer skippedInvalid; - - public static final String SERIALIZED_NAME_SKIPPED_MULTIPLE_MATCHES = "skippedMultipleMatches"; - @SerializedName(SERIALIZED_NAME_SKIPPED_MULTIPLE_MATCHES) - private Integer skippedMultipleMatches; - - public static final String SERIALIZED_NAME_NOT_FOUND = "notFound"; - @SerializedName(SERIALIZED_NAME_NOT_FOUND) - private Integer notFound; - - public static final String SERIALIZED_NAME_CREATED_INVALID = "createdInvalid"; - @SerializedName(SERIALIZED_NAME_CREATED_INVALID) - private Integer createdInvalid; - - public static final String SERIALIZED_NAME_CREATED_NO_EMAIL = "createdNoEmail"; - @SerializedName(SERIALIZED_NAME_CREATED_NO_EMAIL) - private Integer createdNoEmail; - - public static final String SERIALIZED_NAME_CREATED_VALID = "createdValid"; - @SerializedName(SERIALIZED_NAME_CREATED_VALID) - private Integer createdValid; - - public Attribute() { - } - - public Attribute dryRun(Boolean dryRun) { - this.dryRun = dryRun; - return this; - } - - /** - * Get dryRun - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - - public Attribute upsert(Boolean upsert) { - this.upsert = upsert; - return this; - } - - /** - * Get upsert - * @return upsert - */ - @javax.annotation.Nullable - public Boolean getUpsert() { - return upsert; - } - - public void setUpsert(Boolean upsert) { - this.upsert = upsert; - } - - - public Attribute status(StatusEnum status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - public StatusEnum getStatus() { - return status; - } - - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public Attribute errorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - /** - * Get errorMessage - * @return errorMessage - */ - @javax.annotation.Nullable - public String getErrorMessage() { - return errorMessage; - } - - public void setErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - } - - - public Attribute totalProcessed(Integer totalProcessed) { - this.totalProcessed = totalProcessed; - return this; - } - - /** - * Get totalProcessed - * @return totalProcessed - */ - @javax.annotation.Nullable - public Integer getTotalProcessed() { - return totalProcessed; - } - - public void setTotalProcessed(Integer totalProcessed) { - this.totalProcessed = totalProcessed; - } - - - public Attribute totalRows(Integer totalRows) { - this.totalRows = totalRows; - return this; - } - - /** - * Get totalRows - * @return totalRows - */ - @javax.annotation.Nullable - public Integer getTotalRows() { - return totalRows; - } - - public void setTotalRows(Integer totalRows) { - this.totalRows = totalRows; - } - - - public Attribute updatedValid(Integer updatedValid) { - this.updatedValid = updatedValid; - return this; - } - - /** - * Get updatedValid - * @return updatedValid - */ - @javax.annotation.Nullable - public Integer getUpdatedValid() { - return updatedValid; - } - - public void setUpdatedValid(Integer updatedValid) { - this.updatedValid = updatedValid; - } - - - public Attribute updatedNoEmail(Integer updatedNoEmail) { - this.updatedNoEmail = updatedNoEmail; - return this; - } - - /** - * Get updatedNoEmail - * @return updatedNoEmail - */ - @javax.annotation.Nullable - public Integer getUpdatedNoEmail() { - return updatedNoEmail; - } - - public void setUpdatedNoEmail(Integer updatedNoEmail) { - this.updatedNoEmail = updatedNoEmail; - } - - - public Attribute updatedInvalid(Integer updatedInvalid) { - this.updatedInvalid = updatedInvalid; - return this; - } - - /** - * Get updatedInvalid - * @return updatedInvalid - */ - @javax.annotation.Nullable - public Integer getUpdatedInvalid() { - return updatedInvalid; - } - - public void setUpdatedInvalid(Integer updatedInvalid) { - this.updatedInvalid = updatedInvalid; - } - - - public Attribute skippedDuplicate(Integer skippedDuplicate) { - this.skippedDuplicate = skippedDuplicate; - return this; - } - - /** - * Get skippedDuplicate - * @return skippedDuplicate - */ - @javax.annotation.Nullable - public Integer getSkippedDuplicate() { - return skippedDuplicate; - } - - public void setSkippedDuplicate(Integer skippedDuplicate) { - this.skippedDuplicate = skippedDuplicate; - } - - - public Attribute skippedInvalid(Integer skippedInvalid) { - this.skippedInvalid = skippedInvalid; - return this; - } - - /** - * Get skippedInvalid - * @return skippedInvalid - */ - @javax.annotation.Nullable - public Integer getSkippedInvalid() { - return skippedInvalid; - } - - public void setSkippedInvalid(Integer skippedInvalid) { - this.skippedInvalid = skippedInvalid; - } - - - public Attribute skippedMultipleMatches(Integer skippedMultipleMatches) { - this.skippedMultipleMatches = skippedMultipleMatches; - return this; - } - - /** - * Get skippedMultipleMatches - * @return skippedMultipleMatches - */ - @javax.annotation.Nullable - public Integer getSkippedMultipleMatches() { - return skippedMultipleMatches; - } - - public void setSkippedMultipleMatches(Integer skippedMultipleMatches) { - this.skippedMultipleMatches = skippedMultipleMatches; - } - - - public Attribute notFound(Integer notFound) { - this.notFound = notFound; - return this; - } - - /** - * Get notFound - * @return notFound - */ - @javax.annotation.Nullable - public Integer getNotFound() { - return notFound; - } - - public void setNotFound(Integer notFound) { - this.notFound = notFound; - } - - - public Attribute createdInvalid(Integer createdInvalid) { - this.createdInvalid = createdInvalid; - return this; - } - - /** - * Get createdInvalid - * @return createdInvalid - */ - @javax.annotation.Nullable - public Integer getCreatedInvalid() { - return createdInvalid; - } - - public void setCreatedInvalid(Integer createdInvalid) { - this.createdInvalid = createdInvalid; - } - - - public Attribute createdNoEmail(Integer createdNoEmail) { - this.createdNoEmail = createdNoEmail; - return this; - } - - /** - * Get createdNoEmail - * @return createdNoEmail - */ - @javax.annotation.Nullable - public Integer getCreatedNoEmail() { - return createdNoEmail; - } - - public void setCreatedNoEmail(Integer createdNoEmail) { - this.createdNoEmail = createdNoEmail; - } - - - public Attribute createdValid(Integer createdValid) { - this.createdValid = createdValid; - return this; - } - - /** - * Get createdValid - * @return createdValid - */ - @javax.annotation.Nullable - public Integer getCreatedValid() { - return createdValid; - } - - public void setCreatedValid(Integer createdValid) { - this.createdValid = createdValid; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Attribute attribute = (Attribute) o; - return Objects.equals(this.dryRun, attribute.dryRun) && - Objects.equals(this.upsert, attribute.upsert) && - Objects.equals(this.status, attribute.status) && - Objects.equals(this.errorMessage, attribute.errorMessage) && - Objects.equals(this.totalProcessed, attribute.totalProcessed) && - Objects.equals(this.totalRows, attribute.totalRows) && - Objects.equals(this.updatedValid, attribute.updatedValid) && - Objects.equals(this.updatedNoEmail, attribute.updatedNoEmail) && - Objects.equals(this.updatedInvalid, attribute.updatedInvalid) && - Objects.equals(this.skippedDuplicate, attribute.skippedDuplicate) && - Objects.equals(this.skippedInvalid, attribute.skippedInvalid) && - Objects.equals(this.skippedMultipleMatches, attribute.skippedMultipleMatches) && - Objects.equals(this.notFound, attribute.notFound) && - Objects.equals(this.createdInvalid, attribute.createdInvalid) && - Objects.equals(this.createdNoEmail, attribute.createdNoEmail) && - Objects.equals(this.createdValid, attribute.createdValid); - } - - @Override - public int hashCode() { - return Objects.hash(dryRun, upsert, status, errorMessage, totalProcessed, totalRows, updatedValid, updatedNoEmail, updatedInvalid, skippedDuplicate, skippedInvalid, skippedMultipleMatches, notFound, createdInvalid, createdNoEmail, createdValid); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Attribute {\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" upsert: ").append(toIndentedString(upsert)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); - sb.append(" totalProcessed: ").append(toIndentedString(totalProcessed)).append("\n"); - sb.append(" totalRows: ").append(toIndentedString(totalRows)).append("\n"); - sb.append(" updatedValid: ").append(toIndentedString(updatedValid)).append("\n"); - sb.append(" updatedNoEmail: ").append(toIndentedString(updatedNoEmail)).append("\n"); - sb.append(" updatedInvalid: ").append(toIndentedString(updatedInvalid)).append("\n"); - sb.append(" skippedDuplicate: ").append(toIndentedString(skippedDuplicate)).append("\n"); - sb.append(" skippedInvalid: ").append(toIndentedString(skippedInvalid)).append("\n"); - sb.append(" skippedMultipleMatches: ").append(toIndentedString(skippedMultipleMatches)).append("\n"); - sb.append(" notFound: ").append(toIndentedString(notFound)).append("\n"); - sb.append(" createdInvalid: ").append(toIndentedString(createdInvalid)).append("\n"); - sb.append(" createdNoEmail: ").append(toIndentedString(createdNoEmail)).append("\n"); - sb.append(" createdValid: ").append(toIndentedString(createdValid)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dryRun"); - openapiFields.add("upsert"); - openapiFields.add("status"); - openapiFields.add("errorMessage"); - openapiFields.add("totalProcessed"); - openapiFields.add("totalRows"); - openapiFields.add("updatedValid"); - openapiFields.add("updatedNoEmail"); - openapiFields.add("updatedInvalid"); - openapiFields.add("skippedDuplicate"); - openapiFields.add("skippedInvalid"); - openapiFields.add("skippedMultipleMatches"); - openapiFields.add("notFound"); - openapiFields.add("createdInvalid"); - openapiFields.add("createdNoEmail"); - openapiFields.add("createdValid"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Attribute - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Attribute.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Attribute is not found in the empty JSON string", Attribute.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Attribute.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Attribute` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - StatusEnum.validateJsonElement(jsonObj.get("status")); - } - if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Attribute.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Attribute' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Attribute.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Attribute value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Attribute read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Attribute given an JSON string - * - * @param jsonString JSON string - * @return An instance of Attribute - * @throws IOException if the JSON string is invalid with respect to Attribute - */ - public static Attribute fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Attribute.class); - } - - /** - * Convert an instance of Attribute to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/BaseCompanyModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/BaseCompanyModel.java deleted file mode 100644 index f1c6e8d..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/BaseCompanyModel.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * BaseCompanyModel - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class BaseCompanyModel { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_TELEPHONE = "telephone"; - @SerializedName(SERIALIZED_NAME_TELEPHONE) - private String telephone; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_DBA_NAME = "dbaName"; - @SerializedName(SERIALIZED_NAME_DBA_NAME) - private String dbaName; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_DO_TIN_MATCH = "doTinMatch"; - @SerializedName(SERIALIZED_NAME_DO_TIN_MATCH) - private Boolean doTinMatch; - - public static final String SERIALIZED_NAME_GROUP_NAME = "groupName"; - @SerializedName(SERIALIZED_NAME_GROUP_NAME) - private String groupName; - - public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; - @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) - private String foreignProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_RESEND_REQUESTS = "resendRequests"; - @SerializedName(SERIALIZED_NAME_RESEND_REQUESTS) - private Boolean resendRequests; - - public static final String SERIALIZED_NAME_RESEND_INTERVAL_DAYS = "resendIntervalDays"; - @SerializedName(SERIALIZED_NAME_RESEND_INTERVAL_DAYS) - private Integer resendIntervalDays; - - public static final String SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS = "maxReminderAttempts"; - @SerializedName(SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS) - private Integer maxReminderAttempts; - - public BaseCompanyModel() { - } - - public BaseCompanyModel name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public BaseCompanyModel email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public BaseCompanyModel address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public BaseCompanyModel city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public BaseCompanyModel state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public BaseCompanyModel zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public BaseCompanyModel telephone(String telephone) { - this.telephone = telephone; - return this; - } - - /** - * Get telephone - * @return telephone - */ - @javax.annotation.Nullable - public String getTelephone() { - return telephone; - } - - public void setTelephone(String telephone) { - this.telephone = telephone; - } - - - public BaseCompanyModel tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Get tin - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public BaseCompanyModel dbaName(String dbaName) { - this.dbaName = dbaName; - return this; - } - - /** - * Get dbaName - * @return dbaName - */ - @javax.annotation.Nullable - public String getDbaName() { - return dbaName; - } - - public void setDbaName(String dbaName) { - this.dbaName = dbaName; - } - - - public BaseCompanyModel referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public BaseCompanyModel doTinMatch(Boolean doTinMatch) { - this.doTinMatch = doTinMatch; - return this; - } - - /** - * Get doTinMatch - * @return doTinMatch - */ - @javax.annotation.Nullable - public Boolean getDoTinMatch() { - return doTinMatch; - } - - public void setDoTinMatch(Boolean doTinMatch) { - this.doTinMatch = doTinMatch; - } - - - public BaseCompanyModel groupName(String groupName) { - this.groupName = groupName; - return this; - } - - /** - * Get groupName - * @return groupName - */ - @javax.annotation.Nullable - public String getGroupName() { - return groupName; - } - - public void setGroupName(String groupName) { - this.groupName = groupName; - } - - - public BaseCompanyModel foreignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; - return this; - } - - /** - * Get foreignProvince - * @return foreignProvince - */ - @javax.annotation.Nullable - public String getForeignProvince() { - return foreignProvince; - } - - public void setForeignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; - } - - - public BaseCompanyModel countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public BaseCompanyModel resendRequests(Boolean resendRequests) { - this.resendRequests = resendRequests; - return this; - } - - /** - * Get resendRequests - * @return resendRequests - */ - @javax.annotation.Nullable - public Boolean getResendRequests() { - return resendRequests; - } - - public void setResendRequests(Boolean resendRequests) { - this.resendRequests = resendRequests; - } - - - public BaseCompanyModel resendIntervalDays(Integer resendIntervalDays) { - this.resendIntervalDays = resendIntervalDays; - return this; - } - - /** - * Get resendIntervalDays - * @return resendIntervalDays - */ - @javax.annotation.Nullable - public Integer getResendIntervalDays() { - return resendIntervalDays; - } - - public void setResendIntervalDays(Integer resendIntervalDays) { - this.resendIntervalDays = resendIntervalDays; - } - - - public BaseCompanyModel maxReminderAttempts(Integer maxReminderAttempts) { - this.maxReminderAttempts = maxReminderAttempts; - return this; - } - - /** - * Get maxReminderAttempts - * @return maxReminderAttempts - */ - @javax.annotation.Nullable - public Integer getMaxReminderAttempts() { - return maxReminderAttempts; - } - - public void setMaxReminderAttempts(Integer maxReminderAttempts) { - this.maxReminderAttempts = maxReminderAttempts; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseCompanyModel baseCompanyModel = (BaseCompanyModel) o; - return Objects.equals(this.name, baseCompanyModel.name) && - Objects.equals(this.email, baseCompanyModel.email) && - Objects.equals(this.address, baseCompanyModel.address) && - Objects.equals(this.city, baseCompanyModel.city) && - Objects.equals(this.state, baseCompanyModel.state) && - Objects.equals(this.zip, baseCompanyModel.zip) && - Objects.equals(this.telephone, baseCompanyModel.telephone) && - Objects.equals(this.tin, baseCompanyModel.tin) && - Objects.equals(this.dbaName, baseCompanyModel.dbaName) && - Objects.equals(this.referenceId, baseCompanyModel.referenceId) && - Objects.equals(this.doTinMatch, baseCompanyModel.doTinMatch) && - Objects.equals(this.groupName, baseCompanyModel.groupName) && - Objects.equals(this.foreignProvince, baseCompanyModel.foreignProvince) && - Objects.equals(this.countryCode, baseCompanyModel.countryCode) && - Objects.equals(this.resendRequests, baseCompanyModel.resendRequests) && - Objects.equals(this.resendIntervalDays, baseCompanyModel.resendIntervalDays) && - Objects.equals(this.maxReminderAttempts, baseCompanyModel.maxReminderAttempts); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(name, email, address, city, state, zip, telephone, tin, dbaName, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseCompanyModel {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" doTinMatch: ").append(toIndentedString(doTinMatch)).append("\n"); - sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n"); - sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" resendRequests: ").append(toIndentedString(resendRequests)).append("\n"); - sb.append(" resendIntervalDays: ").append(toIndentedString(resendIntervalDays)).append("\n"); - sb.append(" maxReminderAttempts: ").append(toIndentedString(maxReminderAttempts)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BaseCompanyModel - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseCompanyModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BaseCompanyModel is not found in the empty JSON string", BaseCompanyModel.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BaseCompanyModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BaseCompanyModel` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("telephone") != null && !jsonObj.get("telephone").isJsonNull()) && !jsonObj.get("telephone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `telephone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephone").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("groupName") != null && !jsonObj.get("groupName").isJsonNull()) && !jsonObj.get("groupName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString())); - } - if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BaseCompanyModel.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseCompanyModel' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseCompanyModel.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseCompanyModel value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BaseCompanyModel read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BaseCompanyModel given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseCompanyModel - * @throws IOException if the JSON string is invalid with respect to BaseCompanyModel - */ - public static BaseCompanyModel fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseCompanyModel.class); - } - - /** - * Convert an instance of BaseCompanyModel to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/BaseFormListRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/BaseFormListRequest.java deleted file mode 100644 index a5296db..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/BaseFormListRequest.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * BaseFormListRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class BaseFormListRequest { - public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; - @SerializedName(SERIALIZED_NAME_FORM_TYPE) - private String formType; - - public BaseFormListRequest() { - } - - public BaseFormListRequest formType(String formType) { - this.formType = formType; - return this; - } - - /** - * Get formType - * @return formType - */ - @javax.annotation.Nullable - public String getFormType() { - return formType; - } - - public void setFormType(String formType) { - this.formType = formType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BaseFormListRequest baseFormListRequest = (BaseFormListRequest) o; - return Objects.equals(this.formType, baseFormListRequest.formType); - } - - @Override - public int hashCode() { - return Objects.hash(formType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BaseFormListRequest {\n"); - sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("formType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BaseFormListRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseFormListRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BaseFormListRequest is not found in the empty JSON string", BaseFormListRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!BaseFormListRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BaseFormListRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BaseFormListRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseFormListRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseFormListRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseFormListRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BaseFormListRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BaseFormListRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseFormListRequest - * @throws IOException if the JSON string is invalid with respect to BaseFormListRequest - */ - public static BaseFormListRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseFormListRequest.class); - } - - /** - * Convert an instance of BaseFormListRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/BulkUpsert1099FormsRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/BulkUpsert1099FormsRequest.java deleted file mode 100644 index ecdea7c..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/BulkUpsert1099FormsRequest.java +++ /dev/null @@ -1,591 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1042SList; -import Avalara.SDK.model.A1099.V2.Form1095BList; -import Avalara.SDK.model.A1099.V2.Form1095CList; -import Avalara.SDK.model.A1099.V2.Form1099DivList; -import Avalara.SDK.model.A1099.V2.Form1099IntList; -import Avalara.SDK.model.A1099.V2.Form1099KList; -import Avalara.SDK.model.A1099.V2.Form1099MiscList; -import Avalara.SDK.model.A1099.V2.Form1099NecList; -import Avalara.SDK.model.A1099.V2.Form1099RList; -import Avalara.SDK.model.A1099.V2.Form1099RListItem; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import Avalara.SDK.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class BulkUpsert1099FormsRequest extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(BulkUpsert1099FormsRequest.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BulkUpsert1099FormsRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BulkUpsert1099FormsRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterForm1042SList = gson.getDelegateAdapter(this, TypeToken.get(Form1042SList.class)); - final TypeAdapter adapterForm1095BList = gson.getDelegateAdapter(this, TypeToken.get(Form1095BList.class)); - final TypeAdapter adapterForm1095CList = gson.getDelegateAdapter(this, TypeToken.get(Form1095CList.class)); - final TypeAdapter adapterForm1099DivList = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivList.class)); - final TypeAdapter adapterForm1099IntList = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntList.class)); - final TypeAdapter adapterForm1099KList = gson.getDelegateAdapter(this, TypeToken.get(Form1099KList.class)); - final TypeAdapter adapterForm1099MiscList = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscList.class)); - final TypeAdapter adapterForm1099NecList = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecList.class)); - final TypeAdapter adapterForm1099RList = gson.getDelegateAdapter(this, TypeToken.get(Form1099RList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BulkUpsert1099FormsRequest value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Form1042SList` - if (value.getActualInstance() instanceof Form1042SList) { - JsonElement element = adapterForm1042SList.toJsonTree((Form1042SList)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1095BList` - if (value.getActualInstance() instanceof Form1095BList) { - JsonElement element = adapterForm1095BList.toJsonTree((Form1095BList)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1095CList` - if (value.getActualInstance() instanceof Form1095CList) { - JsonElement element = adapterForm1095CList.toJsonTree((Form1095CList)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099DivList` - if (value.getActualInstance() instanceof Form1099DivList) { - JsonElement element = adapterForm1099DivList.toJsonTree((Form1099DivList)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099IntList` - if (value.getActualInstance() instanceof Form1099IntList) { - JsonElement element = adapterForm1099IntList.toJsonTree((Form1099IntList)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099KList` - if (value.getActualInstance() instanceof Form1099KList) { - JsonElement element = adapterForm1099KList.toJsonTree((Form1099KList)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099MiscList` - if (value.getActualInstance() instanceof Form1099MiscList) { - JsonElement element = adapterForm1099MiscList.toJsonTree((Form1099MiscList)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099NecList` - if (value.getActualInstance() instanceof Form1099NecList) { - JsonElement element = adapterForm1099NecList.toJsonTree((Form1099NecList)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099RList` - if (value.getActualInstance() instanceof Form1099RList) { - JsonElement element = adapterForm1099RList.toJsonTree((Form1099RList)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList"); - } - - @Override - public BulkUpsert1099FormsRequest read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Form1042SList - try { - // validate the JSON object to see if any exception is thrown - Form1042SList.validateJsonElement(jsonElement); - actualAdapter = adapterForm1042SList; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1042SList'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1042SList failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1042SList'", e); - } - // deserialize Form1095BList - try { - // validate the JSON object to see if any exception is thrown - Form1095BList.validateJsonElement(jsonElement); - actualAdapter = adapterForm1095BList; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1095BList'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1095BList failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1095BList'", e); - } - // deserialize Form1095CList - try { - // validate the JSON object to see if any exception is thrown - Form1095CList.validateJsonElement(jsonElement); - actualAdapter = adapterForm1095CList; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1095CList'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1095CList failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1095CList'", e); - } - // deserialize Form1099DivList - try { - // validate the JSON object to see if any exception is thrown - Form1099DivList.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099DivList; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099DivList'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099DivList failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099DivList'", e); - } - // deserialize Form1099IntList - try { - // validate the JSON object to see if any exception is thrown - Form1099IntList.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099IntList; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099IntList'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099IntList failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099IntList'", e); - } - // deserialize Form1099KList - try { - // validate the JSON object to see if any exception is thrown - Form1099KList.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099KList; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099KList'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099KList failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099KList'", e); - } - // deserialize Form1099MiscList - try { - // validate the JSON object to see if any exception is thrown - Form1099MiscList.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099MiscList; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099MiscList'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099MiscList failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099MiscList'", e); - } - // deserialize Form1099NecList - try { - // validate the JSON object to see if any exception is thrown - Form1099NecList.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099NecList; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099NecList'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099NecList failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099NecList'", e); - } - // deserialize Form1099RList - try { - // validate the JSON object to see if any exception is thrown - Form1099RList.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099RList; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099RList'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099RList failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099RList'", e); - } - - if (match == 1) { - BulkUpsert1099FormsRequest ret = new BulkUpsert1099FormsRequest(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for BulkUpsert1099FormsRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public BulkUpsert1099FormsRequest() { - super("oneOf", Boolean.FALSE); - } - - public BulkUpsert1099FormsRequest(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Form1042SList", Form1042SList.class); - schemas.put("Form1095BList", Form1095BList.class); - schemas.put("Form1095CList", Form1095CList.class); - schemas.put("Form1099DivList", Form1099DivList.class); - schemas.put("Form1099IntList", Form1099IntList.class); - schemas.put("Form1099KList", Form1099KList.class); - schemas.put("Form1099MiscList", Form1099MiscList.class); - schemas.put("Form1099NecList", Form1099NecList.class); - schemas.put("Form1099RList", Form1099RList.class); - } - - @Override - public Map> getSchemas() { - return BulkUpsert1099FormsRequest.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Form1042SList) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1095BList) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1095CList) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099DivList) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099IntList) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099KList) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099MiscList) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099NecList) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099RList) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList"); - } - - /** - * Get the actual instance, which can be the following: - * Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList - * - * @return The actual instance (Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Form1042SList`. If the actual instance is not `Form1042SList`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1042SList` - * @throws ClassCastException if the instance is not `Form1042SList` - */ - public Form1042SList getForm1042SList() throws ClassCastException { - return (Form1042SList)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1095BList`. If the actual instance is not `Form1095BList`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1095BList` - * @throws ClassCastException if the instance is not `Form1095BList` - */ - public Form1095BList getForm1095BList() throws ClassCastException { - return (Form1095BList)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1095CList`. If the actual instance is not `Form1095CList`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1095CList` - * @throws ClassCastException if the instance is not `Form1095CList` - */ - public Form1095CList getForm1095CList() throws ClassCastException { - return (Form1095CList)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099DivList`. If the actual instance is not `Form1099DivList`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099DivList` - * @throws ClassCastException if the instance is not `Form1099DivList` - */ - public Form1099DivList getForm1099DivList() throws ClassCastException { - return (Form1099DivList)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099IntList`. If the actual instance is not `Form1099IntList`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099IntList` - * @throws ClassCastException if the instance is not `Form1099IntList` - */ - public Form1099IntList getForm1099IntList() throws ClassCastException { - return (Form1099IntList)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099KList`. If the actual instance is not `Form1099KList`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099KList` - * @throws ClassCastException if the instance is not `Form1099KList` - */ - public Form1099KList getForm1099KList() throws ClassCastException { - return (Form1099KList)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099MiscList`. If the actual instance is not `Form1099MiscList`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099MiscList` - * @throws ClassCastException if the instance is not `Form1099MiscList` - */ - public Form1099MiscList getForm1099MiscList() throws ClassCastException { - return (Form1099MiscList)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099NecList`. If the actual instance is not `Form1099NecList`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099NecList` - * @throws ClassCastException if the instance is not `Form1099NecList` - */ - public Form1099NecList getForm1099NecList() throws ClassCastException { - return (Form1099NecList)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099RList`. If the actual instance is not `Form1099RList`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099RList` - * @throws ClassCastException if the instance is not `Form1099RList` - */ - public Form1099RList getForm1099RList() throws ClassCastException { - return (Form1099RList)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to BulkUpsert1099FormsRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Form1042SList - try { - Form1042SList.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1042SList failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1095BList - try { - Form1095BList.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1095BList failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1095CList - try { - Form1095CList.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1095CList failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099DivList - try { - Form1099DivList.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099DivList failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099IntList - try { - Form1099IntList.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099IntList failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099KList - try { - Form1099KList.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099KList failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099MiscList - try { - Form1099MiscList.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099MiscList failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099NecList - try { - Form1099NecList.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099NecList failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099RList - try { - Form1099RList.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099RList failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for BulkUpsert1099FormsRequest with oneOf schemas: Form1042SList, Form1095BList, Form1095CList, Form1099DivList, Form1099IntList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of BulkUpsert1099FormsRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of BulkUpsert1099FormsRequest - * @throws IOException if the JSON string is invalid with respect to BulkUpsert1099FormsRequest - */ - public static BulkUpsert1099FormsRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BulkUpsert1099FormsRequest.class); - } - - /** - * Convert an instance of BulkUpsert1099FormsRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.java index 2f28f64..686ea5f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.java @@ -62,6 +62,10 @@ public class CompanyCreateUpdateRequestModel { @SerializedName(SERIALIZED_NAME_NAME) private String name; + public static final String SERIALIZED_NAME_DBA_NAME = "dbaName"; + @SerializedName(SERIALIZED_NAME_DBA_NAME) + private String dbaName; + public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) private String email; @@ -90,10 +94,6 @@ public class CompanyCreateUpdateRequestModel { @SerializedName(SERIALIZED_NAME_TIN) private String tin; - public static final String SERIALIZED_NAME_DBA_NAME = "dbaName"; - @SerializedName(SERIALIZED_NAME_DBA_NAME) - private String dbaName; - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; @SerializedName(SERIALIZED_NAME_REFERENCE_ID) private String referenceId; @@ -135,7 +135,7 @@ public CompanyCreateUpdateRequestModel name(String name) { } /** - * Get name + * Legal name. Not the DBA name. * @return name */ @javax.annotation.Nullable @@ -148,13 +148,32 @@ public void setName(String name) { } + public CompanyCreateUpdateRequestModel dbaName(String dbaName) { + this.dbaName = dbaName; + return this; + } + + /** + * Doing Business As (DBA) name or continuation of a long legal name. + * @return dbaName + */ + @javax.annotation.Nullable + public String getDbaName() { + return dbaName; + } + + public void setDbaName(String dbaName) { + this.dbaName = dbaName; + } + + public CompanyCreateUpdateRequestModel email(String email) { this.email = email; return this; } /** - * Get email + * Contact email address. For inquiries by vendors/employees. * @return email */ @javax.annotation.Nullable @@ -173,7 +192,7 @@ public CompanyCreateUpdateRequestModel address(String address) { } /** - * Get address + * Address. * @return address */ @javax.annotation.Nullable @@ -192,7 +211,7 @@ public CompanyCreateUpdateRequestModel city(String city) { } /** - * Get city + * City. * @return city */ @javax.annotation.Nullable @@ -211,7 +230,7 @@ public CompanyCreateUpdateRequestModel state(String state) { } /** - * Get state + * Two-letter US state or Canadian province code (required for US/CA addresses). * @return state */ @javax.annotation.Nullable @@ -230,7 +249,7 @@ public CompanyCreateUpdateRequestModel zip(String zip) { } /** - * Get zip + * ZIP/postal code. * @return zip */ @javax.annotation.Nullable @@ -249,7 +268,7 @@ public CompanyCreateUpdateRequestModel telephone(String telephone) { } /** - * Get telephone + * Contact phone number (must contain at least 10 digits, max 15 characters). * @return telephone */ @javax.annotation.Nullable @@ -268,7 +287,7 @@ public CompanyCreateUpdateRequestModel tin(String tin) { } /** - * Get tin + * Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies). * @return tin */ @javax.annotation.Nullable @@ -281,32 +300,13 @@ public void setTin(String tin) { } - public CompanyCreateUpdateRequestModel dbaName(String dbaName) { - this.dbaName = dbaName; - return this; - } - - /** - * Get dbaName - * @return dbaName - */ - @javax.annotation.Nullable - public String getDbaName() { - return dbaName; - } - - public void setDbaName(String dbaName) { - this.dbaName = dbaName; - } - - public CompanyCreateUpdateRequestModel referenceId(String referenceId) { this.referenceId = referenceId; return this; } /** - * Get referenceId + * Internal reference ID. Never shown to any agency or recipient. * @return referenceId */ @javax.annotation.Nullable @@ -325,7 +325,7 @@ public CompanyCreateUpdateRequestModel doTinMatch(Boolean doTinMatch) { } /** - * Get doTinMatch + * Indicates whether the company authorizes IRS TIN matching. * @return doTinMatch */ @javax.annotation.Nullable @@ -344,7 +344,7 @@ public CompanyCreateUpdateRequestModel groupName(String groupName) { } /** - * Get groupName + * Group name for organizing companies (creates or finds group by name). * @return groupName */ @javax.annotation.Nullable @@ -363,7 +363,7 @@ public CompanyCreateUpdateRequestModel foreignProvince(String foreignProvince) { } /** - * Get foreignProvince + * Province or region for non-US/CA addresses. * @return foreignProvince */ @javax.annotation.Nullable @@ -382,7 +382,7 @@ public CompanyCreateUpdateRequestModel countryCode(String countryCode) { } /** - * Get countryCode + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * @return countryCode */ @javax.annotation.Nullable @@ -401,7 +401,7 @@ public CompanyCreateUpdateRequestModel resendRequests(Boolean resendRequests) { } /** - * Get resendRequests + * Boolean to enable automatic reminder emails (default: false). * @return resendRequests */ @javax.annotation.Nullable @@ -420,7 +420,7 @@ public CompanyCreateUpdateRequestModel resendIntervalDays(Integer resendInterval } /** - * Get resendIntervalDays + * Days between reminder emails (7-365, required if resendRequests is true). * @return resendIntervalDays */ @javax.annotation.Nullable @@ -439,7 +439,7 @@ public CompanyCreateUpdateRequestModel maxReminderAttempts(Integer maxReminderAt } /** - * Get maxReminderAttempts + * Maximum number of reminder attempts (1-52, required if resendRequests is true). * @return maxReminderAttempts */ @javax.annotation.Nullable @@ -463,6 +463,7 @@ public boolean equals(Object o) { } CompanyCreateUpdateRequestModel companyCreateUpdateRequestModel = (CompanyCreateUpdateRequestModel) o; return Objects.equals(this.name, companyCreateUpdateRequestModel.name) && + Objects.equals(this.dbaName, companyCreateUpdateRequestModel.dbaName) && Objects.equals(this.email, companyCreateUpdateRequestModel.email) && Objects.equals(this.address, companyCreateUpdateRequestModel.address) && Objects.equals(this.city, companyCreateUpdateRequestModel.city) && @@ -470,7 +471,6 @@ public boolean equals(Object o) { Objects.equals(this.zip, companyCreateUpdateRequestModel.zip) && Objects.equals(this.telephone, companyCreateUpdateRequestModel.telephone) && Objects.equals(this.tin, companyCreateUpdateRequestModel.tin) && - Objects.equals(this.dbaName, companyCreateUpdateRequestModel.dbaName) && Objects.equals(this.referenceId, companyCreateUpdateRequestModel.referenceId) && Objects.equals(this.doTinMatch, companyCreateUpdateRequestModel.doTinMatch) && Objects.equals(this.groupName, companyCreateUpdateRequestModel.groupName) && @@ -487,7 +487,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, email, address, city, state, zip, telephone, tin, dbaName, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts); + return Objects.hash(name, dbaName, email, address, city, state, zip, telephone, tin, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts); } private static int hashCodeNullable(JsonNullable a) { @@ -502,6 +502,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CompanyCreateUpdateRequestModel {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); @@ -509,7 +510,6 @@ public String toString() { sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" doTinMatch: ").append(toIndentedString(doTinMatch)).append("\n"); sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n"); @@ -541,6 +541,7 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("name"); + openapiFields.add("dbaName"); openapiFields.add("email"); openapiFields.add("address"); openapiFields.add("city"); @@ -548,7 +549,6 @@ private String toIndentedString(Object o) { openapiFields.add("zip"); openapiFields.add("telephone"); openapiFields.add("tin"); - openapiFields.add("dbaName"); openapiFields.add("referenceId"); openapiFields.add("doTinMatch"); openapiFields.add("groupName"); @@ -560,6 +560,14 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("zip"); + openapiRequiredFields.add("telephone"); + openapiRequiredFields.add("tin"); + openapiRequiredFields.add("countryCode"); } /** @@ -582,10 +590,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CompanyCreateUpdateRequestModel` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CompanyCreateUpdateRequestModel.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } + if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); + } if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } @@ -607,9 +625,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } - if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); - } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyModel.java deleted file mode 100644 index 02dded8..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyModel.java +++ /dev/null @@ -1,805 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * CompanyModel - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class CompanyModel { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_USER_ID = "userId"; - @SerializedName(SERIALIZED_NAME_USER_ID) - private Long userId; - - public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) - private Long accountId; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_TELEPHONE = "telephone"; - @SerializedName(SERIALIZED_NAME_TELEPHONE) - private String telephone; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_DBA_NAME = "dbaName"; - @SerializedName(SERIALIZED_NAME_DBA_NAME) - private String dbaName; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_DO_TIN_MATCH = "doTinMatch"; - @SerializedName(SERIALIZED_NAME_DO_TIN_MATCH) - private Boolean doTinMatch; - - public static final String SERIALIZED_NAME_GROUP_NAME = "groupName"; - @SerializedName(SERIALIZED_NAME_GROUP_NAME) - private String groupName; - - public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; - @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) - private String foreignProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_RESEND_REQUESTS = "resendRequests"; - @SerializedName(SERIALIZED_NAME_RESEND_REQUESTS) - private Boolean resendRequests; - - public static final String SERIALIZED_NAME_RESEND_INTERVAL_DAYS = "resendIntervalDays"; - @SerializedName(SERIALIZED_NAME_RESEND_INTERVAL_DAYS) - private Integer resendIntervalDays; - - public static final String SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS = "maxReminderAttempts"; - @SerializedName(SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS) - private Integer maxReminderAttempts; - - public CompanyModel() { - } - - public CompanyModel id(String id) { - this.id = id; - return this; - } - - /** - * Company ID - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public CompanyModel userId(Long userId) { - this.userId = userId; - return this; - } - - /** - * User ID associated with the company - * @return userId - */ - @javax.annotation.Nullable - public Long getUserId() { - return userId; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - - public CompanyModel accountId(Long accountId) { - this.accountId = accountId; - return this; - } - - /** - * Account ID associated with the company - * @return accountId - */ - @javax.annotation.Nullable - public Long getAccountId() { - return accountId; - } - - public void setAccountId(Long accountId) { - this.accountId = accountId; - } - - - public CompanyModel createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Record creation timestamp - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public CompanyModel updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Record last update timestamp - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public CompanyModel name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public CompanyModel email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public CompanyModel address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public CompanyModel city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public CompanyModel state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public CompanyModel zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public CompanyModel telephone(String telephone) { - this.telephone = telephone; - return this; - } - - /** - * Get telephone - * @return telephone - */ - @javax.annotation.Nullable - public String getTelephone() { - return telephone; - } - - public void setTelephone(String telephone) { - this.telephone = telephone; - } - - - public CompanyModel tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Get tin - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public CompanyModel dbaName(String dbaName) { - this.dbaName = dbaName; - return this; - } - - /** - * Get dbaName - * @return dbaName - */ - @javax.annotation.Nullable - public String getDbaName() { - return dbaName; - } - - public void setDbaName(String dbaName) { - this.dbaName = dbaName; - } - - - public CompanyModel referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public CompanyModel doTinMatch(Boolean doTinMatch) { - this.doTinMatch = doTinMatch; - return this; - } - - /** - * Get doTinMatch - * @return doTinMatch - */ - @javax.annotation.Nullable - public Boolean getDoTinMatch() { - return doTinMatch; - } - - public void setDoTinMatch(Boolean doTinMatch) { - this.doTinMatch = doTinMatch; - } - - - public CompanyModel groupName(String groupName) { - this.groupName = groupName; - return this; - } - - /** - * Get groupName - * @return groupName - */ - @javax.annotation.Nullable - public String getGroupName() { - return groupName; - } - - public void setGroupName(String groupName) { - this.groupName = groupName; - } - - - public CompanyModel foreignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; - return this; - } - - /** - * Get foreignProvince - * @return foreignProvince - */ - @javax.annotation.Nullable - public String getForeignProvince() { - return foreignProvince; - } - - public void setForeignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; - } - - - public CompanyModel countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public CompanyModel resendRequests(Boolean resendRequests) { - this.resendRequests = resendRequests; - return this; - } - - /** - * Get resendRequests - * @return resendRequests - */ - @javax.annotation.Nullable - public Boolean getResendRequests() { - return resendRequests; - } - - public void setResendRequests(Boolean resendRequests) { - this.resendRequests = resendRequests; - } - - - public CompanyModel resendIntervalDays(Integer resendIntervalDays) { - this.resendIntervalDays = resendIntervalDays; - return this; - } - - /** - * Get resendIntervalDays - * @return resendIntervalDays - */ - @javax.annotation.Nullable - public Integer getResendIntervalDays() { - return resendIntervalDays; - } - - public void setResendIntervalDays(Integer resendIntervalDays) { - this.resendIntervalDays = resendIntervalDays; - } - - - public CompanyModel maxReminderAttempts(Integer maxReminderAttempts) { - this.maxReminderAttempts = maxReminderAttempts; - return this; - } - - /** - * Get maxReminderAttempts - * @return maxReminderAttempts - */ - @javax.annotation.Nullable - public Integer getMaxReminderAttempts() { - return maxReminderAttempts; - } - - public void setMaxReminderAttempts(Integer maxReminderAttempts) { - this.maxReminderAttempts = maxReminderAttempts; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CompanyModel companyModel = (CompanyModel) o; - return Objects.equals(this.id, companyModel.id) && - Objects.equals(this.userId, companyModel.userId) && - Objects.equals(this.accountId, companyModel.accountId) && - Objects.equals(this.createdAt, companyModel.createdAt) && - Objects.equals(this.updatedAt, companyModel.updatedAt) && - Objects.equals(this.name, companyModel.name) && - Objects.equals(this.email, companyModel.email) && - Objects.equals(this.address, companyModel.address) && - Objects.equals(this.city, companyModel.city) && - Objects.equals(this.state, companyModel.state) && - Objects.equals(this.zip, companyModel.zip) && - Objects.equals(this.telephone, companyModel.telephone) && - Objects.equals(this.tin, companyModel.tin) && - Objects.equals(this.dbaName, companyModel.dbaName) && - Objects.equals(this.referenceId, companyModel.referenceId) && - Objects.equals(this.doTinMatch, companyModel.doTinMatch) && - Objects.equals(this.groupName, companyModel.groupName) && - Objects.equals(this.foreignProvince, companyModel.foreignProvince) && - Objects.equals(this.countryCode, companyModel.countryCode) && - Objects.equals(this.resendRequests, companyModel.resendRequests) && - Objects.equals(this.resendIntervalDays, companyModel.resendIntervalDays) && - Objects.equals(this.maxReminderAttempts, companyModel.maxReminderAttempts); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(id, userId, accountId, createdAt, updatedAt, name, email, address, city, state, zip, telephone, tin, dbaName, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CompanyModel {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" doTinMatch: ").append(toIndentedString(doTinMatch)).append("\n"); - sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n"); - sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" resendRequests: ").append(toIndentedString(resendRequests)).append("\n"); - sb.append(" resendIntervalDays: ").append(toIndentedString(resendIntervalDays)).append("\n"); - sb.append(" maxReminderAttempts: ").append(toIndentedString(maxReminderAttempts)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("email"); - openapiFields.add("address"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("telephone"); - openapiFields.add("tin"); - openapiFields.add("dbaName"); - openapiFields.add("referenceId"); - openapiFields.add("doTinMatch"); - openapiFields.add("groupName"); - openapiFields.add("foreignProvince"); - openapiFields.add("countryCode"); - openapiFields.add("resendRequests"); - openapiFields.add("resendIntervalDays"); - openapiFields.add("maxReminderAttempts"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CompanyModel - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CompanyModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CompanyModel is not found in the empty JSON string", CompanyModel.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CompanyModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CompanyModel` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("telephone") != null && !jsonObj.get("telephone").isJsonNull()) && !jsonObj.get("telephone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `telephone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephone").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("groupName") != null && !jsonObj.get("groupName").isJsonNull()) && !jsonObj.get("groupName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString())); - } - if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CompanyModel.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CompanyModel' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CompanyModel.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CompanyModel value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CompanyModel read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CompanyModel given an JSON string - * - * @param jsonString JSON string - * @return An instance of CompanyModel - * @throws IOException if the JSON string is invalid with respect to CompanyModel - */ - public static CompanyModel fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CompanyModel.class); - } - - /** - * Convert an instance of CompanyModel to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java index fe54e4e..6d5c0ca 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java @@ -63,13 +63,13 @@ public class CompanyResponse { @SerializedName(SERIALIZED_NAME_ID) private String id; - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; - public static final String SERIALIZED_NAME_GROUP_NAME = "groupName"; - @SerializedName(SERIALIZED_NAME_GROUP_NAME) - private String groupName; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -79,6 +79,10 @@ public class CompanyResponse { @SerializedName(SERIALIZED_NAME_DBA_NAME) private String dbaName; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) private String address; @@ -91,22 +95,10 @@ public class CompanyResponse { @SerializedName(SERIALIZED_NAME_STATE) private String state; - public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; - @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) - private String foreignProvince; - public static final String SERIALIZED_NAME_ZIP = "zip"; @SerializedName(SERIALIZED_NAME_ZIP) private String zip; - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - public static final String SERIALIZED_NAME_TELEPHONE = "telephone"; @SerializedName(SERIALIZED_NAME_TELEPHONE) private String telephone; @@ -115,10 +107,26 @@ public class CompanyResponse { @SerializedName(SERIALIZED_NAME_TIN) private String tin; + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + public static final String SERIALIZED_NAME_DO_TIN_MATCH = "doTinMatch"; @SerializedName(SERIALIZED_NAME_DO_TIN_MATCH) private Boolean doTinMatch; + public static final String SERIALIZED_NAME_GROUP_NAME = "groupName"; + @SerializedName(SERIALIZED_NAME_GROUP_NAME) + private String groupName; + + public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) + private String foreignProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + public static final String SERIALIZED_NAME_RESEND_REQUESTS = "resendRequests"; @SerializedName(SERIALIZED_NAME_RESEND_REQUESTS) private Boolean resendRequests; @@ -131,14 +139,6 @@ public class CompanyResponse { @SerializedName(SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS) private Integer maxReminderAttempts; - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - public CompanyResponse() { } @@ -148,7 +148,7 @@ public CompanyResponse id(String id) { } /** - * Get id + * Unique identifier set when the record is created. * @return id */ @javax.annotation.Nullable @@ -161,41 +161,41 @@ public void setId(String id) { } - public CompanyResponse referenceId(String referenceId) { - this.referenceId = referenceId; + public CompanyResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; return this; } /** - * Get referenceId - * @return referenceId + * Date time when the record was created. + * @return createdAt */ @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; + public OffsetDateTime getCreatedAt() { + return createdAt; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; } - public CompanyResponse groupName(String groupName) { - this.groupName = groupName; + public CompanyResponse updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; return this; } /** - * Get groupName - * @return groupName + * Date time when the record was last updated. + * @return updatedAt */ @javax.annotation.Nullable - public String getGroupName() { - return groupName; + public OffsetDateTime getUpdatedAt() { + return updatedAt; } - public void setGroupName(String groupName) { - this.groupName = groupName; + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; } @@ -205,7 +205,7 @@ public CompanyResponse name(String name) { } /** - * Get name + * Legal name. Not the DBA name. * @return name */ @javax.annotation.Nullable @@ -224,7 +224,7 @@ public CompanyResponse dbaName(String dbaName) { } /** - * Get dbaName + * Doing Business As (DBA) name or continuation of a long legal name. * @return dbaName */ @javax.annotation.Nullable @@ -237,13 +237,32 @@ public void setDbaName(String dbaName) { } + public CompanyResponse email(String email) { + this.email = email; + return this; + } + + /** + * Contact email address. For inquiries by vendors/employees. + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public CompanyResponse address(String address) { this.address = address; return this; } /** - * Get address + * Address. * @return address */ @javax.annotation.Nullable @@ -262,7 +281,7 @@ public CompanyResponse city(String city) { } /** - * Get city + * City. * @return city */ @javax.annotation.Nullable @@ -281,7 +300,7 @@ public CompanyResponse state(String state) { } /** - * Get state + * Two-letter US state or Canadian province code (required for US/CA addresses). * @return state */ @javax.annotation.Nullable @@ -294,136 +313,155 @@ public void setState(String state) { } - public CompanyResponse foreignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public CompanyResponse zip(String zip) { + this.zip = zip; return this; } /** - * Get foreignProvince - * @return foreignProvince + * ZIP/postal code. + * @return zip */ @javax.annotation.Nullable - public String getForeignProvince() { - return foreignProvince; + public String getZip() { + return zip; } - public void setForeignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; + public void setZip(String zip) { + this.zip = zip; } - public CompanyResponse zip(String zip) { - this.zip = zip; + public CompanyResponse telephone(String telephone) { + this.telephone = telephone; return this; } /** - * Get zip - * @return zip + * Contact phone number (must contain at least 10 digits, max 15 characters). + * @return telephone */ @javax.annotation.Nullable - public String getZip() { - return zip; + public String getTelephone() { + return telephone; } - public void setZip(String zip) { - this.zip = zip; + public void setTelephone(String telephone) { + this.telephone = telephone; } - public CompanyResponse countryCode(String countryCode) { - this.countryCode = countryCode; + public CompanyResponse tin(String tin) { + this.tin = tin; return this; } /** - * Get countryCode - * @return countryCode + * Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies). + * @return tin */ @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; + public String getTin() { + return tin; } - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; + public void setTin(String tin) { + this.tin = tin; } - public CompanyResponse email(String email) { - this.email = email; + public CompanyResponse referenceId(String referenceId) { + this.referenceId = referenceId; return this; } /** - * Get email - * @return email + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId */ @javax.annotation.Nullable - public String getEmail() { - return email; + public String getReferenceId() { + return referenceId; } - public void setEmail(String email) { - this.email = email; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; } - public CompanyResponse telephone(String telephone) { - this.telephone = telephone; + public CompanyResponse doTinMatch(Boolean doTinMatch) { + this.doTinMatch = doTinMatch; return this; } /** - * Get telephone - * @return telephone + * Indicates whether the company authorizes IRS TIN matching. + * @return doTinMatch */ @javax.annotation.Nullable - public String getTelephone() { - return telephone; + public Boolean getDoTinMatch() { + return doTinMatch; } - public void setTelephone(String telephone) { - this.telephone = telephone; + public void setDoTinMatch(Boolean doTinMatch) { + this.doTinMatch = doTinMatch; } - public CompanyResponse tin(String tin) { - this.tin = tin; + public CompanyResponse groupName(String groupName) { + this.groupName = groupName; return this; } /** - * Get tin - * @return tin + * Group name for organizing companies (creates or finds group by name). + * @return groupName */ @javax.annotation.Nullable - public String getTin() { - return tin; + public String getGroupName() { + return groupName; } - public void setTin(String tin) { - this.tin = tin; + public void setGroupName(String groupName) { + this.groupName = groupName; } - public CompanyResponse doTinMatch(Boolean doTinMatch) { - this.doTinMatch = doTinMatch; + public CompanyResponse foreignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; return this; } /** - * Get doTinMatch - * @return doTinMatch + * Province or region for non-US/CA addresses. + * @return foreignProvince */ @javax.annotation.Nullable - public Boolean getDoTinMatch() { - return doTinMatch; + public String getForeignProvince() { + return foreignProvince; } - public void setDoTinMatch(Boolean doTinMatch) { - this.doTinMatch = doTinMatch; + public void setForeignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + } + + + public CompanyResponse countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; } @@ -433,7 +471,7 @@ public CompanyResponse resendRequests(Boolean resendRequests) { } /** - * Get resendRequests + * Boolean to enable automatic reminder emails (default: false). * @return resendRequests */ @javax.annotation.Nullable @@ -452,7 +490,7 @@ public CompanyResponse resendIntervalDays(Integer resendIntervalDays) { } /** - * Get resendIntervalDays + * Days between reminder emails (7-365, required if resendRequests is true). * @return resendIntervalDays */ @javax.annotation.Nullable @@ -471,7 +509,7 @@ public CompanyResponse maxReminderAttempts(Integer maxReminderAttempts) { } /** - * Get maxReminderAttempts + * Maximum number of reminder attempts (1-52, required if resendRequests is true). * @return maxReminderAttempts */ @javax.annotation.Nullable @@ -484,44 +522,6 @@ public void setMaxReminderAttempts(Integer maxReminderAttempts) { } - public CompanyResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public CompanyResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - @Override public boolean equals(Object o) { @@ -533,25 +533,25 @@ public boolean equals(Object o) { } CompanyResponse companyResponse = (CompanyResponse) o; return Objects.equals(this.id, companyResponse.id) && - Objects.equals(this.referenceId, companyResponse.referenceId) && - Objects.equals(this.groupName, companyResponse.groupName) && + Objects.equals(this.createdAt, companyResponse.createdAt) && + Objects.equals(this.updatedAt, companyResponse.updatedAt) && Objects.equals(this.name, companyResponse.name) && Objects.equals(this.dbaName, companyResponse.dbaName) && + Objects.equals(this.email, companyResponse.email) && Objects.equals(this.address, companyResponse.address) && Objects.equals(this.city, companyResponse.city) && Objects.equals(this.state, companyResponse.state) && - Objects.equals(this.foreignProvince, companyResponse.foreignProvince) && Objects.equals(this.zip, companyResponse.zip) && - Objects.equals(this.countryCode, companyResponse.countryCode) && - Objects.equals(this.email, companyResponse.email) && Objects.equals(this.telephone, companyResponse.telephone) && Objects.equals(this.tin, companyResponse.tin) && + Objects.equals(this.referenceId, companyResponse.referenceId) && Objects.equals(this.doTinMatch, companyResponse.doTinMatch) && + Objects.equals(this.groupName, companyResponse.groupName) && + Objects.equals(this.foreignProvince, companyResponse.foreignProvince) && + Objects.equals(this.countryCode, companyResponse.countryCode) && Objects.equals(this.resendRequests, companyResponse.resendRequests) && Objects.equals(this.resendIntervalDays, companyResponse.resendIntervalDays) && - Objects.equals(this.maxReminderAttempts, companyResponse.maxReminderAttempts) && - Objects.equals(this.createdAt, companyResponse.createdAt) && - Objects.equals(this.updatedAt, companyResponse.updatedAt); + Objects.equals(this.maxReminderAttempts, companyResponse.maxReminderAttempts); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -560,7 +560,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, referenceId, groupName, name, dbaName, address, city, state, foreignProvince, zip, countryCode, email, telephone, tin, doTinMatch, resendRequests, resendIntervalDays, maxReminderAttempts, createdAt, updatedAt); + return Objects.hash(id, createdAt, updatedAt, name, dbaName, email, address, city, state, zip, telephone, tin, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts); } private static int hashCodeNullable(JsonNullable a) { @@ -575,25 +575,25 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CompanyResponse {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" doTinMatch: ").append(toIndentedString(doTinMatch)).append("\n"); + sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n"); + sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" resendRequests: ").append(toIndentedString(resendRequests)).append("\n"); sb.append(" resendIntervalDays: ").append(toIndentedString(resendIntervalDays)).append("\n"); sb.append(" maxReminderAttempts: ").append(toIndentedString(maxReminderAttempts)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); } @@ -616,9 +616,34 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("dbaName"); + openapiFields.add("email"); + openapiFields.add("address"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("telephone"); + openapiFields.add("tin"); + openapiFields.add("referenceId"); + openapiFields.add("doTinMatch"); + openapiFields.add("groupName"); + openapiFields.add("foreignProvince"); + openapiFields.add("countryCode"); + openapiFields.add("resendRequests"); + openapiFields.add("resendIntervalDays"); + openapiFields.add("maxReminderAttempts"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("zip"); + openapiRequiredFields.add("telephone"); + openapiRequiredFields.add("tin"); + openapiRequiredFields.add("countryCode"); } /** @@ -641,22 +666,26 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CompanyResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CompanyResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("groupName") != null && !jsonObj.get("groupName").isJsonNull()) && !jsonObj.get("groupName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString())); - } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } @@ -666,24 +695,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } - if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); - } if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } if ((jsonObj.get("telephone") != null && !jsonObj.get("telephone").isJsonNull()) && !jsonObj.get("telephone").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `telephone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephone").toString())); } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); + } + if ((jsonObj.get("groupName") != null && !jsonObj.get("groupName").isJsonNull()) && !jsonObj.get("groupName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString())); + } + if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponseModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponseModel.java deleted file mode 100644 index b03cd41..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponseModel.java +++ /dev/null @@ -1,755 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * CompanyResponseModel - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class CompanyResponseModel { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_TELEPHONE = "telephone"; - @SerializedName(SERIALIZED_NAME_TELEPHONE) - private String telephone; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_DBA_NAME = "dbaName"; - @SerializedName(SERIALIZED_NAME_DBA_NAME) - private String dbaName; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_DO_TIN_MATCH = "doTinMatch"; - @SerializedName(SERIALIZED_NAME_DO_TIN_MATCH) - private Boolean doTinMatch; - - public static final String SERIALIZED_NAME_GROUP_NAME = "groupName"; - @SerializedName(SERIALIZED_NAME_GROUP_NAME) - private String groupName; - - public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; - @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) - private String foreignProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_RESEND_REQUESTS = "resendRequests"; - @SerializedName(SERIALIZED_NAME_RESEND_REQUESTS) - private Boolean resendRequests; - - public static final String SERIALIZED_NAME_RESEND_INTERVAL_DAYS = "resendIntervalDays"; - @SerializedName(SERIALIZED_NAME_RESEND_INTERVAL_DAYS) - private Integer resendIntervalDays; - - public static final String SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS = "maxReminderAttempts"; - @SerializedName(SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS) - private Integer maxReminderAttempts; - - public CompanyResponseModel() { - } - - public CompanyResponseModel id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public CompanyResponseModel createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public CompanyResponseModel updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public CompanyResponseModel name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public CompanyResponseModel email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public CompanyResponseModel address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public CompanyResponseModel city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public CompanyResponseModel state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public CompanyResponseModel zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public CompanyResponseModel telephone(String telephone) { - this.telephone = telephone; - return this; - } - - /** - * Get telephone - * @return telephone - */ - @javax.annotation.Nullable - public String getTelephone() { - return telephone; - } - - public void setTelephone(String telephone) { - this.telephone = telephone; - } - - - public CompanyResponseModel tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Get tin - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public CompanyResponseModel dbaName(String dbaName) { - this.dbaName = dbaName; - return this; - } - - /** - * Get dbaName - * @return dbaName - */ - @javax.annotation.Nullable - public String getDbaName() { - return dbaName; - } - - public void setDbaName(String dbaName) { - this.dbaName = dbaName; - } - - - public CompanyResponseModel referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public CompanyResponseModel doTinMatch(Boolean doTinMatch) { - this.doTinMatch = doTinMatch; - return this; - } - - /** - * Get doTinMatch - * @return doTinMatch - */ - @javax.annotation.Nullable - public Boolean getDoTinMatch() { - return doTinMatch; - } - - public void setDoTinMatch(Boolean doTinMatch) { - this.doTinMatch = doTinMatch; - } - - - public CompanyResponseModel groupName(String groupName) { - this.groupName = groupName; - return this; - } - - /** - * Get groupName - * @return groupName - */ - @javax.annotation.Nullable - public String getGroupName() { - return groupName; - } - - public void setGroupName(String groupName) { - this.groupName = groupName; - } - - - public CompanyResponseModel foreignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; - return this; - } - - /** - * Get foreignProvince - * @return foreignProvince - */ - @javax.annotation.Nullable - public String getForeignProvince() { - return foreignProvince; - } - - public void setForeignProvince(String foreignProvince) { - this.foreignProvince = foreignProvince; - } - - - public CompanyResponseModel countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public CompanyResponseModel resendRequests(Boolean resendRequests) { - this.resendRequests = resendRequests; - return this; - } - - /** - * Get resendRequests - * @return resendRequests - */ - @javax.annotation.Nullable - public Boolean getResendRequests() { - return resendRequests; - } - - public void setResendRequests(Boolean resendRequests) { - this.resendRequests = resendRequests; - } - - - public CompanyResponseModel resendIntervalDays(Integer resendIntervalDays) { - this.resendIntervalDays = resendIntervalDays; - return this; - } - - /** - * Get resendIntervalDays - * @return resendIntervalDays - */ - @javax.annotation.Nullable - public Integer getResendIntervalDays() { - return resendIntervalDays; - } - - public void setResendIntervalDays(Integer resendIntervalDays) { - this.resendIntervalDays = resendIntervalDays; - } - - - public CompanyResponseModel maxReminderAttempts(Integer maxReminderAttempts) { - this.maxReminderAttempts = maxReminderAttempts; - return this; - } - - /** - * Get maxReminderAttempts - * @return maxReminderAttempts - */ - @javax.annotation.Nullable - public Integer getMaxReminderAttempts() { - return maxReminderAttempts; - } - - public void setMaxReminderAttempts(Integer maxReminderAttempts) { - this.maxReminderAttempts = maxReminderAttempts; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CompanyResponseModel companyResponseModel = (CompanyResponseModel) o; - return Objects.equals(this.id, companyResponseModel.id) && - Objects.equals(this.createdAt, companyResponseModel.createdAt) && - Objects.equals(this.updatedAt, companyResponseModel.updatedAt) && - Objects.equals(this.name, companyResponseModel.name) && - Objects.equals(this.email, companyResponseModel.email) && - Objects.equals(this.address, companyResponseModel.address) && - Objects.equals(this.city, companyResponseModel.city) && - Objects.equals(this.state, companyResponseModel.state) && - Objects.equals(this.zip, companyResponseModel.zip) && - Objects.equals(this.telephone, companyResponseModel.telephone) && - Objects.equals(this.tin, companyResponseModel.tin) && - Objects.equals(this.dbaName, companyResponseModel.dbaName) && - Objects.equals(this.referenceId, companyResponseModel.referenceId) && - Objects.equals(this.doTinMatch, companyResponseModel.doTinMatch) && - Objects.equals(this.groupName, companyResponseModel.groupName) && - Objects.equals(this.foreignProvince, companyResponseModel.foreignProvince) && - Objects.equals(this.countryCode, companyResponseModel.countryCode) && - Objects.equals(this.resendRequests, companyResponseModel.resendRequests) && - Objects.equals(this.resendIntervalDays, companyResponseModel.resendIntervalDays) && - Objects.equals(this.maxReminderAttempts, companyResponseModel.maxReminderAttempts); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(id, createdAt, updatedAt, name, email, address, city, state, zip, telephone, tin, dbaName, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CompanyResponseModel {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" doTinMatch: ").append(toIndentedString(doTinMatch)).append("\n"); - sb.append(" groupName: ").append(toIndentedString(groupName)).append("\n"); - sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" resendRequests: ").append(toIndentedString(resendRequests)).append("\n"); - sb.append(" resendIntervalDays: ").append(toIndentedString(resendIntervalDays)).append("\n"); - sb.append(" maxReminderAttempts: ").append(toIndentedString(maxReminderAttempts)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("email"); - openapiFields.add("address"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("telephone"); - openapiFields.add("tin"); - openapiFields.add("dbaName"); - openapiFields.add("referenceId"); - openapiFields.add("doTinMatch"); - openapiFields.add("groupName"); - openapiFields.add("foreignProvince"); - openapiFields.add("countryCode"); - openapiFields.add("resendRequests"); - openapiFields.add("resendIntervalDays"); - openapiFields.add("maxReminderAttempts"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CompanyResponseModel - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CompanyResponseModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CompanyResponseModel is not found in the empty JSON string", CompanyResponseModel.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CompanyResponseModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CompanyResponseModel` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("telephone") != null && !jsonObj.get("telephone").isJsonNull()) && !jsonObj.get("telephone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `telephone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephone").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("groupName") != null && !jsonObj.get("groupName").isJsonNull()) && !jsonObj.get("groupName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `groupName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("groupName").toString())); - } - if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CompanyResponseModel.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CompanyResponseModel' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CompanyResponseModel.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CompanyResponseModel value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CompanyResponseModel read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CompanyResponseModel given an JSON string - * - * @param jsonString JSON string - * @return An instance of CompanyResponseModel - * @throws IOException if the JSON string is invalid with respect to CompanyResponseModel - */ - public static CompanyResponseModel fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CompanyResponseModel.class); - } - - /** - * Convert an instance of CompanyResponseModel to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java similarity index 76% rename from src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualRequest.java rename to src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java index adc8c8e..c645bf3 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java @@ -26,7 +26,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; +import java.time.LocalDate; import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; @@ -55,10 +55,14 @@ import Avalara.SDK.JSON; /** - * CoveredIndividualRequest + * Covered individual information for health coverage forms */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class CoveredIndividualRequest { +public class CoveredIndividual { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) private String firstName; @@ -81,7 +85,7 @@ public class CoveredIndividualRequest { public static final String SERIALIZED_NAME_BIRTH_DATE = "birthDate"; @SerializedName(SERIALIZED_NAME_BIRTH_DATE) - private OffsetDateTime birthDate; + private LocalDate birthDate; public static final String SERIALIZED_NAME_COVERED_ALL_MONTHS = "coveredAllMonths"; @SerializedName(SERIALIZED_NAME_COVERED_ALL_MONTHS) @@ -135,10 +139,28 @@ public class CoveredIndividualRequest { @SerializedName(SERIALIZED_NAME_COVERED_DECEMBER) private Boolean coveredDecember; - public CoveredIndividualRequest() { + public CoveredIndividual() { + } + + public CoveredIndividual( + String id + ) { + this(); + this.id = id; + } + + /** + * Covered individual's ID + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; } - public CoveredIndividualRequest firstName(String firstName) { + + + public CoveredIndividual firstName(String firstName) { this.firstName = firstName; return this; } @@ -157,7 +179,7 @@ public void setFirstName(String firstName) { } - public CoveredIndividualRequest middleName(String middleName) { + public CoveredIndividual middleName(String middleName) { this.middleName = middleName; return this; } @@ -176,7 +198,7 @@ public void setMiddleName(String middleName) { } - public CoveredIndividualRequest lastName(String lastName) { + public CoveredIndividual lastName(String lastName) { this.lastName = lastName; return this; } @@ -195,7 +217,7 @@ public void setLastName(String lastName) { } - public CoveredIndividualRequest nameSuffix(String nameSuffix) { + public CoveredIndividual nameSuffix(String nameSuffix) { this.nameSuffix = nameSuffix; return this; } @@ -214,13 +236,13 @@ public void setNameSuffix(String nameSuffix) { } - public CoveredIndividualRequest tin(String tin) { + public CoveredIndividual tin(String tin) { this.tin = tin; return this; } /** - * Covered individual's TIN (SSN or ITIN) + * Covered individual's Federal Tax Identification Number (TIN).. SSN or ITIN. Required unless unavailable. * @return tin */ @javax.annotation.Nullable @@ -233,26 +255,26 @@ public void setTin(String tin) { } - public CoveredIndividualRequest birthDate(OffsetDateTime birthDate) { + public CoveredIndividual birthDate(LocalDate birthDate) { this.birthDate = birthDate; return this; } /** - * Covered individual's date of birth + * Covered individual's date of birth - Required when SSN is missing. * @return birthDate */ @javax.annotation.Nullable - public OffsetDateTime getBirthDate() { + public LocalDate getBirthDate() { return birthDate; } - public void setBirthDate(OffsetDateTime birthDate) { + public void setBirthDate(LocalDate birthDate) { this.birthDate = birthDate; } - public CoveredIndividualRequest coveredAllMonths(Boolean coveredAllMonths) { + public CoveredIndividual coveredAllMonths(Boolean coveredAllMonths) { this.coveredAllMonths = coveredAllMonths; return this; } @@ -271,7 +293,7 @@ public void setCoveredAllMonths(Boolean coveredAllMonths) { } - public CoveredIndividualRequest coveredJanuary(Boolean coveredJanuary) { + public CoveredIndividual coveredJanuary(Boolean coveredJanuary) { this.coveredJanuary = coveredJanuary; return this; } @@ -290,7 +312,7 @@ public void setCoveredJanuary(Boolean coveredJanuary) { } - public CoveredIndividualRequest coveredFebruary(Boolean coveredFebruary) { + public CoveredIndividual coveredFebruary(Boolean coveredFebruary) { this.coveredFebruary = coveredFebruary; return this; } @@ -309,7 +331,7 @@ public void setCoveredFebruary(Boolean coveredFebruary) { } - public CoveredIndividualRequest coveredMarch(Boolean coveredMarch) { + public CoveredIndividual coveredMarch(Boolean coveredMarch) { this.coveredMarch = coveredMarch; return this; } @@ -328,7 +350,7 @@ public void setCoveredMarch(Boolean coveredMarch) { } - public CoveredIndividualRequest coveredApril(Boolean coveredApril) { + public CoveredIndividual coveredApril(Boolean coveredApril) { this.coveredApril = coveredApril; return this; } @@ -347,7 +369,7 @@ public void setCoveredApril(Boolean coveredApril) { } - public CoveredIndividualRequest coveredMay(Boolean coveredMay) { + public CoveredIndividual coveredMay(Boolean coveredMay) { this.coveredMay = coveredMay; return this; } @@ -366,7 +388,7 @@ public void setCoveredMay(Boolean coveredMay) { } - public CoveredIndividualRequest coveredJune(Boolean coveredJune) { + public CoveredIndividual coveredJune(Boolean coveredJune) { this.coveredJune = coveredJune; return this; } @@ -385,7 +407,7 @@ public void setCoveredJune(Boolean coveredJune) { } - public CoveredIndividualRequest coveredJuly(Boolean coveredJuly) { + public CoveredIndividual coveredJuly(Boolean coveredJuly) { this.coveredJuly = coveredJuly; return this; } @@ -404,7 +426,7 @@ public void setCoveredJuly(Boolean coveredJuly) { } - public CoveredIndividualRequest coveredAugust(Boolean coveredAugust) { + public CoveredIndividual coveredAugust(Boolean coveredAugust) { this.coveredAugust = coveredAugust; return this; } @@ -423,7 +445,7 @@ public void setCoveredAugust(Boolean coveredAugust) { } - public CoveredIndividualRequest coveredSeptember(Boolean coveredSeptember) { + public CoveredIndividual coveredSeptember(Boolean coveredSeptember) { this.coveredSeptember = coveredSeptember; return this; } @@ -442,7 +464,7 @@ public void setCoveredSeptember(Boolean coveredSeptember) { } - public CoveredIndividualRequest coveredOctober(Boolean coveredOctober) { + public CoveredIndividual coveredOctober(Boolean coveredOctober) { this.coveredOctober = coveredOctober; return this; } @@ -461,7 +483,7 @@ public void setCoveredOctober(Boolean coveredOctober) { } - public CoveredIndividualRequest coveredNovember(Boolean coveredNovember) { + public CoveredIndividual coveredNovember(Boolean coveredNovember) { this.coveredNovember = coveredNovember; return this; } @@ -480,7 +502,7 @@ public void setCoveredNovember(Boolean coveredNovember) { } - public CoveredIndividualRequest coveredDecember(Boolean coveredDecember) { + public CoveredIndividual coveredDecember(Boolean coveredDecember) { this.coveredDecember = coveredDecember; return this; } @@ -508,26 +530,27 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CoveredIndividualRequest coveredIndividualRequest = (CoveredIndividualRequest) o; - return Objects.equals(this.firstName, coveredIndividualRequest.firstName) && - Objects.equals(this.middleName, coveredIndividualRequest.middleName) && - Objects.equals(this.lastName, coveredIndividualRequest.lastName) && - Objects.equals(this.nameSuffix, coveredIndividualRequest.nameSuffix) && - Objects.equals(this.tin, coveredIndividualRequest.tin) && - Objects.equals(this.birthDate, coveredIndividualRequest.birthDate) && - Objects.equals(this.coveredAllMonths, coveredIndividualRequest.coveredAllMonths) && - Objects.equals(this.coveredJanuary, coveredIndividualRequest.coveredJanuary) && - Objects.equals(this.coveredFebruary, coveredIndividualRequest.coveredFebruary) && - Objects.equals(this.coveredMarch, coveredIndividualRequest.coveredMarch) && - Objects.equals(this.coveredApril, coveredIndividualRequest.coveredApril) && - Objects.equals(this.coveredMay, coveredIndividualRequest.coveredMay) && - Objects.equals(this.coveredJune, coveredIndividualRequest.coveredJune) && - Objects.equals(this.coveredJuly, coveredIndividualRequest.coveredJuly) && - Objects.equals(this.coveredAugust, coveredIndividualRequest.coveredAugust) && - Objects.equals(this.coveredSeptember, coveredIndividualRequest.coveredSeptember) && - Objects.equals(this.coveredOctober, coveredIndividualRequest.coveredOctober) && - Objects.equals(this.coveredNovember, coveredIndividualRequest.coveredNovember) && - Objects.equals(this.coveredDecember, coveredIndividualRequest.coveredDecember); + CoveredIndividual coveredIndividual = (CoveredIndividual) o; + return Objects.equals(this.id, coveredIndividual.id) && + Objects.equals(this.firstName, coveredIndividual.firstName) && + Objects.equals(this.middleName, coveredIndividual.middleName) && + Objects.equals(this.lastName, coveredIndividual.lastName) && + Objects.equals(this.nameSuffix, coveredIndividual.nameSuffix) && + Objects.equals(this.tin, coveredIndividual.tin) && + Objects.equals(this.birthDate, coveredIndividual.birthDate) && + Objects.equals(this.coveredAllMonths, coveredIndividual.coveredAllMonths) && + Objects.equals(this.coveredJanuary, coveredIndividual.coveredJanuary) && + Objects.equals(this.coveredFebruary, coveredIndividual.coveredFebruary) && + Objects.equals(this.coveredMarch, coveredIndividual.coveredMarch) && + Objects.equals(this.coveredApril, coveredIndividual.coveredApril) && + Objects.equals(this.coveredMay, coveredIndividual.coveredMay) && + Objects.equals(this.coveredJune, coveredIndividual.coveredJune) && + Objects.equals(this.coveredJuly, coveredIndividual.coveredJuly) && + Objects.equals(this.coveredAugust, coveredIndividual.coveredAugust) && + Objects.equals(this.coveredSeptember, coveredIndividual.coveredSeptember) && + Objects.equals(this.coveredOctober, coveredIndividual.coveredOctober) && + Objects.equals(this.coveredNovember, coveredIndividual.coveredNovember) && + Objects.equals(this.coveredDecember, coveredIndividual.coveredDecember); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -536,7 +559,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(firstName, middleName, lastName, nameSuffix, tin, birthDate, coveredAllMonths, coveredJanuary, coveredFebruary, coveredMarch, coveredApril, coveredMay, coveredJune, coveredJuly, coveredAugust, coveredSeptember, coveredOctober, coveredNovember, coveredDecember); + return Objects.hash(id, firstName, middleName, lastName, nameSuffix, tin, birthDate, coveredAllMonths, coveredJanuary, coveredFebruary, coveredMarch, coveredApril, coveredMay, coveredJune, coveredJuly, coveredAugust, coveredSeptember, coveredOctober, coveredNovember, coveredDecember); } private static int hashCodeNullable(JsonNullable a) { @@ -549,7 +572,8 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CoveredIndividualRequest {\n"); + sb.append("class CoveredIndividual {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" middleName: ").append(toIndentedString(middleName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); @@ -591,6 +615,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); openapiFields.add("firstName"); openapiFields.add("middleName"); openapiFields.add("lastName"); @@ -613,29 +638,41 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("firstName"); + openapiRequiredFields.add("lastName"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CoveredIndividualRequest + * @throws IOException if the JSON Element is invalid with respect to CoveredIndividual */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!CoveredIndividualRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CoveredIndividualRequest is not found in the empty JSON string", CoveredIndividualRequest.openapiRequiredFields.toString())); + if (!CoveredIndividual.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CoveredIndividual is not found in the empty JSON string", CoveredIndividual.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!CoveredIndividualRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoveredIndividualRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!CoveredIndividual.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoveredIndividual` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CoveredIndividual.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } if ((jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonNull()) && !jsonObj.get("firstName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); } @@ -657,22 +694,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CoveredIndividualRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CoveredIndividualRequest' and its subtypes + if (!CoveredIndividual.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CoveredIndividual' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CoveredIndividualRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CoveredIndividual.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CoveredIndividualRequest value) throws IOException { + public void write(JsonWriter out, CoveredIndividual value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public CoveredIndividualRequest read(JsonReader in) throws IOException { + public CoveredIndividual read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -683,18 +720,18 @@ public CoveredIndividualRequest read(JsonReader in) throws IOException { } /** - * Create an instance of CoveredIndividualRequest given an JSON string + * Create an instance of CoveredIndividual given an JSON string * * @param jsonString JSON string - * @return An instance of CoveredIndividualRequest - * @throws IOException if the JSON string is invalid with respect to CoveredIndividualRequest + * @return An instance of CoveredIndividual + * @throws IOException if the JSON string is invalid with respect to CoveredIndividual */ - public static CoveredIndividualRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CoveredIndividualRequest.class); + public static CoveredIndividual fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CoveredIndividual.class); } /** - * Convert an instance of CoveredIndividualRequest to an JSON string + * Convert an instance of CoveredIndividual to an JSON string * * @return JSON string */ diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReference.java b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReference.java deleted file mode 100644 index de5c23d..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReference.java +++ /dev/null @@ -1,744 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * CoveredIndividualReference - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class CoveredIndividualReference { - public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_MIDDLE_NAME = "middleName"; - @SerializedName(SERIALIZED_NAME_MIDDLE_NAME) - private String middleName; - - public static final String SERIALIZED_NAME_LAST_NAME = "lastName"; - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_NAME_SUFFIX = "nameSuffix"; - @SerializedName(SERIALIZED_NAME_NAME_SUFFIX) - private String nameSuffix; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_BIRTH_DATE = "birthDate"; - @SerializedName(SERIALIZED_NAME_BIRTH_DATE) - private OffsetDateTime birthDate; - - public static final String SERIALIZED_NAME_COVERED_MONTH0 = "coveredMonth0"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH0) - private Boolean coveredMonth0; - - public static final String SERIALIZED_NAME_COVERED_MONTH1 = "coveredMonth1"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH1) - private Boolean coveredMonth1; - - public static final String SERIALIZED_NAME_COVERED_MONTH2 = "coveredMonth2"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH2) - private Boolean coveredMonth2; - - public static final String SERIALIZED_NAME_COVERED_MONTH3 = "coveredMonth3"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH3) - private Boolean coveredMonth3; - - public static final String SERIALIZED_NAME_COVERED_MONTH4 = "coveredMonth4"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH4) - private Boolean coveredMonth4; - - public static final String SERIALIZED_NAME_COVERED_MONTH5 = "coveredMonth5"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH5) - private Boolean coveredMonth5; - - public static final String SERIALIZED_NAME_COVERED_MONTH6 = "coveredMonth6"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH6) - private Boolean coveredMonth6; - - public static final String SERIALIZED_NAME_COVERED_MONTH7 = "coveredMonth7"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH7) - private Boolean coveredMonth7; - - public static final String SERIALIZED_NAME_COVERED_MONTH8 = "coveredMonth8"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH8) - private Boolean coveredMonth8; - - public static final String SERIALIZED_NAME_COVERED_MONTH9 = "coveredMonth9"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH9) - private Boolean coveredMonth9; - - public static final String SERIALIZED_NAME_COVERED_MONTH10 = "coveredMonth10"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH10) - private Boolean coveredMonth10; - - public static final String SERIALIZED_NAME_COVERED_MONTH11 = "coveredMonth11"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH11) - private Boolean coveredMonth11; - - public static final String SERIALIZED_NAME_COVERED_MONTH12 = "coveredMonth12"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH12) - private Boolean coveredMonth12; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public CoveredIndividualReference() { - } - - public CoveredIndividualReference firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - */ - @javax.annotation.Nullable - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - public CoveredIndividualReference middleName(String middleName) { - this.middleName = middleName; - return this; - } - - /** - * Get middleName - * @return middleName - */ - @javax.annotation.Nullable - public String getMiddleName() { - return middleName; - } - - public void setMiddleName(String middleName) { - this.middleName = middleName; - } - - - public CoveredIndividualReference lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - */ - @javax.annotation.Nullable - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - public CoveredIndividualReference nameSuffix(String nameSuffix) { - this.nameSuffix = nameSuffix; - return this; - } - - /** - * Get nameSuffix - * @return nameSuffix - */ - @javax.annotation.Nullable - public String getNameSuffix() { - return nameSuffix; - } - - public void setNameSuffix(String nameSuffix) { - this.nameSuffix = nameSuffix; - } - - - public CoveredIndividualReference tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Get tin - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public CoveredIndividualReference birthDate(OffsetDateTime birthDate) { - this.birthDate = birthDate; - return this; - } - - /** - * Get birthDate - * @return birthDate - */ - @javax.annotation.Nullable - public OffsetDateTime getBirthDate() { - return birthDate; - } - - public void setBirthDate(OffsetDateTime birthDate) { - this.birthDate = birthDate; - } - - - public CoveredIndividualReference coveredMonth0(Boolean coveredMonth0) { - this.coveredMonth0 = coveredMonth0; - return this; - } - - /** - * Get coveredMonth0 - * @return coveredMonth0 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth0() { - return coveredMonth0; - } - - public void setCoveredMonth0(Boolean coveredMonth0) { - this.coveredMonth0 = coveredMonth0; - } - - - public CoveredIndividualReference coveredMonth1(Boolean coveredMonth1) { - this.coveredMonth1 = coveredMonth1; - return this; - } - - /** - * Get coveredMonth1 - * @return coveredMonth1 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth1() { - return coveredMonth1; - } - - public void setCoveredMonth1(Boolean coveredMonth1) { - this.coveredMonth1 = coveredMonth1; - } - - - public CoveredIndividualReference coveredMonth2(Boolean coveredMonth2) { - this.coveredMonth2 = coveredMonth2; - return this; - } - - /** - * Get coveredMonth2 - * @return coveredMonth2 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth2() { - return coveredMonth2; - } - - public void setCoveredMonth2(Boolean coveredMonth2) { - this.coveredMonth2 = coveredMonth2; - } - - - public CoveredIndividualReference coveredMonth3(Boolean coveredMonth3) { - this.coveredMonth3 = coveredMonth3; - return this; - } - - /** - * Get coveredMonth3 - * @return coveredMonth3 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth3() { - return coveredMonth3; - } - - public void setCoveredMonth3(Boolean coveredMonth3) { - this.coveredMonth3 = coveredMonth3; - } - - - public CoveredIndividualReference coveredMonth4(Boolean coveredMonth4) { - this.coveredMonth4 = coveredMonth4; - return this; - } - - /** - * Get coveredMonth4 - * @return coveredMonth4 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth4() { - return coveredMonth4; - } - - public void setCoveredMonth4(Boolean coveredMonth4) { - this.coveredMonth4 = coveredMonth4; - } - - - public CoveredIndividualReference coveredMonth5(Boolean coveredMonth5) { - this.coveredMonth5 = coveredMonth5; - return this; - } - - /** - * Get coveredMonth5 - * @return coveredMonth5 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth5() { - return coveredMonth5; - } - - public void setCoveredMonth5(Boolean coveredMonth5) { - this.coveredMonth5 = coveredMonth5; - } - - - public CoveredIndividualReference coveredMonth6(Boolean coveredMonth6) { - this.coveredMonth6 = coveredMonth6; - return this; - } - - /** - * Get coveredMonth6 - * @return coveredMonth6 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth6() { - return coveredMonth6; - } - - public void setCoveredMonth6(Boolean coveredMonth6) { - this.coveredMonth6 = coveredMonth6; - } - - - public CoveredIndividualReference coveredMonth7(Boolean coveredMonth7) { - this.coveredMonth7 = coveredMonth7; - return this; - } - - /** - * Get coveredMonth7 - * @return coveredMonth7 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth7() { - return coveredMonth7; - } - - public void setCoveredMonth7(Boolean coveredMonth7) { - this.coveredMonth7 = coveredMonth7; - } - - - public CoveredIndividualReference coveredMonth8(Boolean coveredMonth8) { - this.coveredMonth8 = coveredMonth8; - return this; - } - - /** - * Get coveredMonth8 - * @return coveredMonth8 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth8() { - return coveredMonth8; - } - - public void setCoveredMonth8(Boolean coveredMonth8) { - this.coveredMonth8 = coveredMonth8; - } - - - public CoveredIndividualReference coveredMonth9(Boolean coveredMonth9) { - this.coveredMonth9 = coveredMonth9; - return this; - } - - /** - * Get coveredMonth9 - * @return coveredMonth9 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth9() { - return coveredMonth9; - } - - public void setCoveredMonth9(Boolean coveredMonth9) { - this.coveredMonth9 = coveredMonth9; - } - - - public CoveredIndividualReference coveredMonth10(Boolean coveredMonth10) { - this.coveredMonth10 = coveredMonth10; - return this; - } - - /** - * Get coveredMonth10 - * @return coveredMonth10 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth10() { - return coveredMonth10; - } - - public void setCoveredMonth10(Boolean coveredMonth10) { - this.coveredMonth10 = coveredMonth10; - } - - - public CoveredIndividualReference coveredMonth11(Boolean coveredMonth11) { - this.coveredMonth11 = coveredMonth11; - return this; - } - - /** - * Get coveredMonth11 - * @return coveredMonth11 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth11() { - return coveredMonth11; - } - - public void setCoveredMonth11(Boolean coveredMonth11) { - this.coveredMonth11 = coveredMonth11; - } - - - public CoveredIndividualReference coveredMonth12(Boolean coveredMonth12) { - this.coveredMonth12 = coveredMonth12; - return this; - } - - /** - * Get coveredMonth12 - * @return coveredMonth12 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth12() { - return coveredMonth12; - } - - public void setCoveredMonth12(Boolean coveredMonth12) { - this.coveredMonth12 = coveredMonth12; - } - - - public CoveredIndividualReference id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public CoveredIndividualReference type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CoveredIndividualReference coveredIndividualReference = (CoveredIndividualReference) o; - return Objects.equals(this.firstName, coveredIndividualReference.firstName) && - Objects.equals(this.middleName, coveredIndividualReference.middleName) && - Objects.equals(this.lastName, coveredIndividualReference.lastName) && - Objects.equals(this.nameSuffix, coveredIndividualReference.nameSuffix) && - Objects.equals(this.tin, coveredIndividualReference.tin) && - Objects.equals(this.birthDate, coveredIndividualReference.birthDate) && - Objects.equals(this.coveredMonth0, coveredIndividualReference.coveredMonth0) && - Objects.equals(this.coveredMonth1, coveredIndividualReference.coveredMonth1) && - Objects.equals(this.coveredMonth2, coveredIndividualReference.coveredMonth2) && - Objects.equals(this.coveredMonth3, coveredIndividualReference.coveredMonth3) && - Objects.equals(this.coveredMonth4, coveredIndividualReference.coveredMonth4) && - Objects.equals(this.coveredMonth5, coveredIndividualReference.coveredMonth5) && - Objects.equals(this.coveredMonth6, coveredIndividualReference.coveredMonth6) && - Objects.equals(this.coveredMonth7, coveredIndividualReference.coveredMonth7) && - Objects.equals(this.coveredMonth8, coveredIndividualReference.coveredMonth8) && - Objects.equals(this.coveredMonth9, coveredIndividualReference.coveredMonth9) && - Objects.equals(this.coveredMonth10, coveredIndividualReference.coveredMonth10) && - Objects.equals(this.coveredMonth11, coveredIndividualReference.coveredMonth11) && - Objects.equals(this.coveredMonth12, coveredIndividualReference.coveredMonth12) && - Objects.equals(this.id, coveredIndividualReference.id) && - Objects.equals(this.type, coveredIndividualReference.type); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(firstName, middleName, lastName, nameSuffix, tin, birthDate, coveredMonth0, coveredMonth1, coveredMonth2, coveredMonth3, coveredMonth4, coveredMonth5, coveredMonth6, coveredMonth7, coveredMonth8, coveredMonth9, coveredMonth10, coveredMonth11, coveredMonth12, id, type); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CoveredIndividualReference {\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" middleName: ").append(toIndentedString(middleName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" nameSuffix: ").append(toIndentedString(nameSuffix)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" birthDate: ").append(toIndentedString(birthDate)).append("\n"); - sb.append(" coveredMonth0: ").append(toIndentedString(coveredMonth0)).append("\n"); - sb.append(" coveredMonth1: ").append(toIndentedString(coveredMonth1)).append("\n"); - sb.append(" coveredMonth2: ").append(toIndentedString(coveredMonth2)).append("\n"); - sb.append(" coveredMonth3: ").append(toIndentedString(coveredMonth3)).append("\n"); - sb.append(" coveredMonth4: ").append(toIndentedString(coveredMonth4)).append("\n"); - sb.append(" coveredMonth5: ").append(toIndentedString(coveredMonth5)).append("\n"); - sb.append(" coveredMonth6: ").append(toIndentedString(coveredMonth6)).append("\n"); - sb.append(" coveredMonth7: ").append(toIndentedString(coveredMonth7)).append("\n"); - sb.append(" coveredMonth8: ").append(toIndentedString(coveredMonth8)).append("\n"); - sb.append(" coveredMonth9: ").append(toIndentedString(coveredMonth9)).append("\n"); - sb.append(" coveredMonth10: ").append(toIndentedString(coveredMonth10)).append("\n"); - sb.append(" coveredMonth11: ").append(toIndentedString(coveredMonth11)).append("\n"); - sb.append(" coveredMonth12: ").append(toIndentedString(coveredMonth12)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CoveredIndividualReference - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CoveredIndividualReference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CoveredIndividualReference is not found in the empty JSON string", CoveredIndividualReference.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CoveredIndividualReference.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoveredIndividualReference` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonNull()) && !jsonObj.get("firstName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); - } - if ((jsonObj.get("middleName") != null && !jsonObj.get("middleName").isJsonNull()) && !jsonObj.get("middleName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `middleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("middleName").toString())); - } - if ((jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonNull()) && !jsonObj.get("lastName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); - } - if ((jsonObj.get("nameSuffix") != null && !jsonObj.get("nameSuffix").isJsonNull()) && !jsonObj.get("nameSuffix").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nameSuffix").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CoveredIndividualReference.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CoveredIndividualReference' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CoveredIndividualReference.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CoveredIndividualReference value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CoveredIndividualReference read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CoveredIndividualReference given an JSON string - * - * @param jsonString JSON string - * @return An instance of CoveredIndividualReference - * @throws IOException if the JSON string is invalid with respect to CoveredIndividualReference - */ - public static CoveredIndividualReference fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CoveredIndividualReference.class); - } - - /** - * Convert an instance of CoveredIndividualReference to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReferenceResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReferenceResponse.java deleted file mode 100644 index a6caef1..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReferenceResponse.java +++ /dev/null @@ -1,734 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * CoveredIndividualReferenceResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class CoveredIndividualReferenceResponse { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; - - public static final String SERIALIZED_NAME_MIDDLE_NAME = "middleName"; - @SerializedName(SERIALIZED_NAME_MIDDLE_NAME) - private String middleName; - - public static final String SERIALIZED_NAME_LAST_NAME = "lastName"; - @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; - - public static final String SERIALIZED_NAME_NAME_SUFFIX = "nameSuffix"; - @SerializedName(SERIALIZED_NAME_NAME_SUFFIX) - private String nameSuffix; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_BIRTH_DATE = "birthDate"; - @SerializedName(SERIALIZED_NAME_BIRTH_DATE) - private OffsetDateTime birthDate; - - public static final String SERIALIZED_NAME_COVERED_MONTH0 = "coveredMonth0"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH0) - private Boolean coveredMonth0; - - public static final String SERIALIZED_NAME_COVERED_MONTH1 = "coveredMonth1"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH1) - private Boolean coveredMonth1; - - public static final String SERIALIZED_NAME_COVERED_MONTH2 = "coveredMonth2"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH2) - private Boolean coveredMonth2; - - public static final String SERIALIZED_NAME_COVERED_MONTH3 = "coveredMonth3"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH3) - private Boolean coveredMonth3; - - public static final String SERIALIZED_NAME_COVERED_MONTH4 = "coveredMonth4"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH4) - private Boolean coveredMonth4; - - public static final String SERIALIZED_NAME_COVERED_MONTH5 = "coveredMonth5"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH5) - private Boolean coveredMonth5; - - public static final String SERIALIZED_NAME_COVERED_MONTH6 = "coveredMonth6"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH6) - private Boolean coveredMonth6; - - public static final String SERIALIZED_NAME_COVERED_MONTH7 = "coveredMonth7"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH7) - private Boolean coveredMonth7; - - public static final String SERIALIZED_NAME_COVERED_MONTH8 = "coveredMonth8"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH8) - private Boolean coveredMonth8; - - public static final String SERIALIZED_NAME_COVERED_MONTH9 = "coveredMonth9"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH9) - private Boolean coveredMonth9; - - public static final String SERIALIZED_NAME_COVERED_MONTH10 = "coveredMonth10"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH10) - private Boolean coveredMonth10; - - public static final String SERIALIZED_NAME_COVERED_MONTH11 = "coveredMonth11"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH11) - private Boolean coveredMonth11; - - public static final String SERIALIZED_NAME_COVERED_MONTH12 = "coveredMonth12"; - @SerializedName(SERIALIZED_NAME_COVERED_MONTH12) - private Boolean coveredMonth12; - - public CoveredIndividualReferenceResponse() { - } - - public CoveredIndividualReferenceResponse id(String id) { - this.id = id; - return this; - } - - /** - * Covered individual ID - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public CoveredIndividualReferenceResponse firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Covered individual's first name - * @return firstName - */ - @javax.annotation.Nullable - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - public CoveredIndividualReferenceResponse middleName(String middleName) { - this.middleName = middleName; - return this; - } - - /** - * Covered individual's middle name - * @return middleName - */ - @javax.annotation.Nullable - public String getMiddleName() { - return middleName; - } - - public void setMiddleName(String middleName) { - this.middleName = middleName; - } - - - public CoveredIndividualReferenceResponse lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Covered individual's last name - * @return lastName - */ - @javax.annotation.Nullable - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - public CoveredIndividualReferenceResponse nameSuffix(String nameSuffix) { - this.nameSuffix = nameSuffix; - return this; - } - - /** - * Covered individual's name suffix - * @return nameSuffix - */ - @javax.annotation.Nullable - public String getNameSuffix() { - return nameSuffix; - } - - public void setNameSuffix(String nameSuffix) { - this.nameSuffix = nameSuffix; - } - - - public CoveredIndividualReferenceResponse tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Covered individual's TIN (SSN or ITIN) - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public CoveredIndividualReferenceResponse birthDate(OffsetDateTime birthDate) { - this.birthDate = birthDate; - return this; - } - - /** - * Covered individual's date of birth - * @return birthDate - */ - @javax.annotation.Nullable - public OffsetDateTime getBirthDate() { - return birthDate; - } - - public void setBirthDate(OffsetDateTime birthDate) { - this.birthDate = birthDate; - } - - - public CoveredIndividualReferenceResponse coveredMonth0(Boolean coveredMonth0) { - this.coveredMonth0 = coveredMonth0; - return this; - } - - /** - * Coverage indicator for all 12 months - * @return coveredMonth0 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth0() { - return coveredMonth0; - } - - public void setCoveredMonth0(Boolean coveredMonth0) { - this.coveredMonth0 = coveredMonth0; - } - - - public CoveredIndividualReferenceResponse coveredMonth1(Boolean coveredMonth1) { - this.coveredMonth1 = coveredMonth1; - return this; - } - - /** - * Coverage indicator for January - * @return coveredMonth1 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth1() { - return coveredMonth1; - } - - public void setCoveredMonth1(Boolean coveredMonth1) { - this.coveredMonth1 = coveredMonth1; - } - - - public CoveredIndividualReferenceResponse coveredMonth2(Boolean coveredMonth2) { - this.coveredMonth2 = coveredMonth2; - return this; - } - - /** - * Coverage indicator for February - * @return coveredMonth2 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth2() { - return coveredMonth2; - } - - public void setCoveredMonth2(Boolean coveredMonth2) { - this.coveredMonth2 = coveredMonth2; - } - - - public CoveredIndividualReferenceResponse coveredMonth3(Boolean coveredMonth3) { - this.coveredMonth3 = coveredMonth3; - return this; - } - - /** - * Coverage indicator for March - * @return coveredMonth3 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth3() { - return coveredMonth3; - } - - public void setCoveredMonth3(Boolean coveredMonth3) { - this.coveredMonth3 = coveredMonth3; - } - - - public CoveredIndividualReferenceResponse coveredMonth4(Boolean coveredMonth4) { - this.coveredMonth4 = coveredMonth4; - return this; - } - - /** - * Coverage indicator for April - * @return coveredMonth4 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth4() { - return coveredMonth4; - } - - public void setCoveredMonth4(Boolean coveredMonth4) { - this.coveredMonth4 = coveredMonth4; - } - - - public CoveredIndividualReferenceResponse coveredMonth5(Boolean coveredMonth5) { - this.coveredMonth5 = coveredMonth5; - return this; - } - - /** - * Coverage indicator for May - * @return coveredMonth5 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth5() { - return coveredMonth5; - } - - public void setCoveredMonth5(Boolean coveredMonth5) { - this.coveredMonth5 = coveredMonth5; - } - - - public CoveredIndividualReferenceResponse coveredMonth6(Boolean coveredMonth6) { - this.coveredMonth6 = coveredMonth6; - return this; - } - - /** - * Coverage indicator for June - * @return coveredMonth6 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth6() { - return coveredMonth6; - } - - public void setCoveredMonth6(Boolean coveredMonth6) { - this.coveredMonth6 = coveredMonth6; - } - - - public CoveredIndividualReferenceResponse coveredMonth7(Boolean coveredMonth7) { - this.coveredMonth7 = coveredMonth7; - return this; - } - - /** - * Coverage indicator for July - * @return coveredMonth7 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth7() { - return coveredMonth7; - } - - public void setCoveredMonth7(Boolean coveredMonth7) { - this.coveredMonth7 = coveredMonth7; - } - - - public CoveredIndividualReferenceResponse coveredMonth8(Boolean coveredMonth8) { - this.coveredMonth8 = coveredMonth8; - return this; - } - - /** - * Coverage indicator for August - * @return coveredMonth8 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth8() { - return coveredMonth8; - } - - public void setCoveredMonth8(Boolean coveredMonth8) { - this.coveredMonth8 = coveredMonth8; - } - - - public CoveredIndividualReferenceResponse coveredMonth9(Boolean coveredMonth9) { - this.coveredMonth9 = coveredMonth9; - return this; - } - - /** - * Coverage indicator for September - * @return coveredMonth9 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth9() { - return coveredMonth9; - } - - public void setCoveredMonth9(Boolean coveredMonth9) { - this.coveredMonth9 = coveredMonth9; - } - - - public CoveredIndividualReferenceResponse coveredMonth10(Boolean coveredMonth10) { - this.coveredMonth10 = coveredMonth10; - return this; - } - - /** - * Coverage indicator for October - * @return coveredMonth10 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth10() { - return coveredMonth10; - } - - public void setCoveredMonth10(Boolean coveredMonth10) { - this.coveredMonth10 = coveredMonth10; - } - - - public CoveredIndividualReferenceResponse coveredMonth11(Boolean coveredMonth11) { - this.coveredMonth11 = coveredMonth11; - return this; - } - - /** - * Coverage indicator for November - * @return coveredMonth11 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth11() { - return coveredMonth11; - } - - public void setCoveredMonth11(Boolean coveredMonth11) { - this.coveredMonth11 = coveredMonth11; - } - - - public CoveredIndividualReferenceResponse coveredMonth12(Boolean coveredMonth12) { - this.coveredMonth12 = coveredMonth12; - return this; - } - - /** - * Coverage indicator for December - * @return coveredMonth12 - */ - @javax.annotation.Nullable - public Boolean getCoveredMonth12() { - return coveredMonth12; - } - - public void setCoveredMonth12(Boolean coveredMonth12) { - this.coveredMonth12 = coveredMonth12; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CoveredIndividualReferenceResponse coveredIndividualReferenceResponse = (CoveredIndividualReferenceResponse) o; - return Objects.equals(this.id, coveredIndividualReferenceResponse.id) && - Objects.equals(this.firstName, coveredIndividualReferenceResponse.firstName) && - Objects.equals(this.middleName, coveredIndividualReferenceResponse.middleName) && - Objects.equals(this.lastName, coveredIndividualReferenceResponse.lastName) && - Objects.equals(this.nameSuffix, coveredIndividualReferenceResponse.nameSuffix) && - Objects.equals(this.tin, coveredIndividualReferenceResponse.tin) && - Objects.equals(this.birthDate, coveredIndividualReferenceResponse.birthDate) && - Objects.equals(this.coveredMonth0, coveredIndividualReferenceResponse.coveredMonth0) && - Objects.equals(this.coveredMonth1, coveredIndividualReferenceResponse.coveredMonth1) && - Objects.equals(this.coveredMonth2, coveredIndividualReferenceResponse.coveredMonth2) && - Objects.equals(this.coveredMonth3, coveredIndividualReferenceResponse.coveredMonth3) && - Objects.equals(this.coveredMonth4, coveredIndividualReferenceResponse.coveredMonth4) && - Objects.equals(this.coveredMonth5, coveredIndividualReferenceResponse.coveredMonth5) && - Objects.equals(this.coveredMonth6, coveredIndividualReferenceResponse.coveredMonth6) && - Objects.equals(this.coveredMonth7, coveredIndividualReferenceResponse.coveredMonth7) && - Objects.equals(this.coveredMonth8, coveredIndividualReferenceResponse.coveredMonth8) && - Objects.equals(this.coveredMonth9, coveredIndividualReferenceResponse.coveredMonth9) && - Objects.equals(this.coveredMonth10, coveredIndividualReferenceResponse.coveredMonth10) && - Objects.equals(this.coveredMonth11, coveredIndividualReferenceResponse.coveredMonth11) && - Objects.equals(this.coveredMonth12, coveredIndividualReferenceResponse.coveredMonth12); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(id, firstName, middleName, lastName, nameSuffix, tin, birthDate, coveredMonth0, coveredMonth1, coveredMonth2, coveredMonth3, coveredMonth4, coveredMonth5, coveredMonth6, coveredMonth7, coveredMonth8, coveredMonth9, coveredMonth10, coveredMonth11, coveredMonth12); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CoveredIndividualReferenceResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" middleName: ").append(toIndentedString(middleName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" nameSuffix: ").append(toIndentedString(nameSuffix)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" birthDate: ").append(toIndentedString(birthDate)).append("\n"); - sb.append(" coveredMonth0: ").append(toIndentedString(coveredMonth0)).append("\n"); - sb.append(" coveredMonth1: ").append(toIndentedString(coveredMonth1)).append("\n"); - sb.append(" coveredMonth2: ").append(toIndentedString(coveredMonth2)).append("\n"); - sb.append(" coveredMonth3: ").append(toIndentedString(coveredMonth3)).append("\n"); - sb.append(" coveredMonth4: ").append(toIndentedString(coveredMonth4)).append("\n"); - sb.append(" coveredMonth5: ").append(toIndentedString(coveredMonth5)).append("\n"); - sb.append(" coveredMonth6: ").append(toIndentedString(coveredMonth6)).append("\n"); - sb.append(" coveredMonth7: ").append(toIndentedString(coveredMonth7)).append("\n"); - sb.append(" coveredMonth8: ").append(toIndentedString(coveredMonth8)).append("\n"); - sb.append(" coveredMonth9: ").append(toIndentedString(coveredMonth9)).append("\n"); - sb.append(" coveredMonth10: ").append(toIndentedString(coveredMonth10)).append("\n"); - sb.append(" coveredMonth11: ").append(toIndentedString(coveredMonth11)).append("\n"); - sb.append(" coveredMonth12: ").append(toIndentedString(coveredMonth12)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("firstName"); - openapiFields.add("middleName"); - openapiFields.add("lastName"); - openapiFields.add("nameSuffix"); - openapiFields.add("tin"); - openapiFields.add("birthDate"); - openapiFields.add("coveredMonth0"); - openapiFields.add("coveredMonth1"); - openapiFields.add("coveredMonth2"); - openapiFields.add("coveredMonth3"); - openapiFields.add("coveredMonth4"); - openapiFields.add("coveredMonth5"); - openapiFields.add("coveredMonth6"); - openapiFields.add("coveredMonth7"); - openapiFields.add("coveredMonth8"); - openapiFields.add("coveredMonth9"); - openapiFields.add("coveredMonth10"); - openapiFields.add("coveredMonth11"); - openapiFields.add("coveredMonth12"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CoveredIndividualReferenceResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CoveredIndividualReferenceResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CoveredIndividualReferenceResponse is not found in the empty JSON string", CoveredIndividualReferenceResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CoveredIndividualReferenceResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoveredIndividualReferenceResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonNull()) && !jsonObj.get("firstName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); - } - if ((jsonObj.get("middleName") != null && !jsonObj.get("middleName").isJsonNull()) && !jsonObj.get("middleName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `middleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("middleName").toString())); - } - if ((jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonNull()) && !jsonObj.get("lastName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); - } - if ((jsonObj.get("nameSuffix") != null && !jsonObj.get("nameSuffix").isJsonNull()) && !jsonObj.get("nameSuffix").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nameSuffix").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CoveredIndividualReferenceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CoveredIndividualReferenceResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CoveredIndividualReferenceResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CoveredIndividualReferenceResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CoveredIndividualReferenceResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CoveredIndividualReferenceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CoveredIndividualReferenceResponse - * @throws IOException if the JSON string is invalid with respect to CoveredIndividualReferenceResponse - */ - public static CoveredIndividualReferenceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CoveredIndividualReferenceResponse.class); - } - - /** - * Convert an instance of CoveredIndividualReferenceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Create1099Form201Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/Create1099Form201Response.java deleted file mode 100644 index 59393c6..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Create1099Form201Response.java +++ /dev/null @@ -1,599 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualReferenceResponse; -import Avalara.SDK.model.A1099.V2.Form1042SListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1095BListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099BaseResponse; -import Avalara.SDK.model.A1099.V2.Form1099DivListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099IntListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099KListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099RListItemResponse; -import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughResponse; -import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentResponse; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import Avalara.SDK.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Create1099Form201Response extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(Create1099Form201Response.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Create1099Form201Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Create1099Form201Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterForm1099BaseResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099BaseResponse.class)); - final TypeAdapter adapterForm1042SListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItemResponse.class)); - final TypeAdapter adapterForm1095BListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItemResponse.class)); - final TypeAdapter adapterForm1099DivListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivListItemResponse.class)); - final TypeAdapter adapterForm1099IntListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntListItemResponse.class)); - final TypeAdapter adapterForm1099KListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099KListItemResponse.class)); - final TypeAdapter adapterForm1099MiscListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscListItemResponse.class)); - final TypeAdapter adapterForm1099NecListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecListItemResponse.class)); - final TypeAdapter adapterForm1099RListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099RListItemResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Create1099Form201Response value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Form1099BaseResponse` - if (value.getActualInstance() instanceof Form1099BaseResponse) { - JsonElement element = adapterForm1099BaseResponse.toJsonTree((Form1099BaseResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1042SListItemResponse` - if (value.getActualInstance() instanceof Form1042SListItemResponse) { - JsonElement element = adapterForm1042SListItemResponse.toJsonTree((Form1042SListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1095BListItemResponse` - if (value.getActualInstance() instanceof Form1095BListItemResponse) { - JsonElement element = adapterForm1095BListItemResponse.toJsonTree((Form1095BListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099DivListItemResponse` - if (value.getActualInstance() instanceof Form1099DivListItemResponse) { - JsonElement element = adapterForm1099DivListItemResponse.toJsonTree((Form1099DivListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099IntListItemResponse` - if (value.getActualInstance() instanceof Form1099IntListItemResponse) { - JsonElement element = adapterForm1099IntListItemResponse.toJsonTree((Form1099IntListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099KListItemResponse` - if (value.getActualInstance() instanceof Form1099KListItemResponse) { - JsonElement element = adapterForm1099KListItemResponse.toJsonTree((Form1099KListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099MiscListItemResponse` - if (value.getActualInstance() instanceof Form1099MiscListItemResponse) { - JsonElement element = adapterForm1099MiscListItemResponse.toJsonTree((Form1099MiscListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099NecListItemResponse` - if (value.getActualInstance() instanceof Form1099NecListItemResponse) { - JsonElement element = adapterForm1099NecListItemResponse.toJsonTree((Form1099NecListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099RListItemResponse` - if (value.getActualInstance() instanceof Form1099RListItemResponse) { - JsonElement element = adapterForm1099RListItemResponse.toJsonTree((Form1099RListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); - } - - @Override - public Create1099Form201Response read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Form1099BaseResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099BaseResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099BaseResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099BaseResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099BaseResponse'", e); - } - // deserialize Form1042SListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1042SListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1042SListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1042SListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1042SListItemResponse'", e); - } - // deserialize Form1095BListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1095BListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1095BListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1095BListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1095BListItemResponse'", e); - } - // deserialize Form1099DivListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099DivListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099DivListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099DivListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099DivListItemResponse'", e); - } - // deserialize Form1099IntListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099IntListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099IntListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099IntListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099IntListItemResponse'", e); - } - // deserialize Form1099KListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099KListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099KListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099KListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099KListItemResponse'", e); - } - // deserialize Form1099MiscListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099MiscListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099MiscListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099MiscListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099MiscListItemResponse'", e); - } - // deserialize Form1099NecListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099NecListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099NecListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099NecListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099NecListItemResponse'", e); - } - // deserialize Form1099RListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099RListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099RListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099RListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099RListItemResponse'", e); - } - - if (match == 1) { - Create1099Form201Response ret = new Create1099Form201Response(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for Create1099Form201Response: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public Create1099Form201Response() { - super("oneOf", Boolean.FALSE); - } - - public Create1099Form201Response(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Form1099BaseResponse", Form1099BaseResponse.class); - schemas.put("Form1042SListItemResponse", Form1042SListItemResponse.class); - schemas.put("Form1095BListItemResponse", Form1095BListItemResponse.class); - schemas.put("Form1099DivListItemResponse", Form1099DivListItemResponse.class); - schemas.put("Form1099IntListItemResponse", Form1099IntListItemResponse.class); - schemas.put("Form1099KListItemResponse", Form1099KListItemResponse.class); - schemas.put("Form1099MiscListItemResponse", Form1099MiscListItemResponse.class); - schemas.put("Form1099NecListItemResponse", Form1099NecListItemResponse.class); - schemas.put("Form1099RListItemResponse", Form1099RListItemResponse.class); - } - - @Override - public Map> getSchemas() { - return Create1099Form201Response.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Form1099BaseResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1042SListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1095BListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099DivListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099IntListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099KListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099MiscListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099NecListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099RListItemResponse) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); - } - - /** - * Get the actual instance, which can be the following: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse - * - * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Form1099BaseResponse`. If the actual instance is not `Form1099BaseResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099BaseResponse` - * @throws ClassCastException if the instance is not `Form1099BaseResponse` - */ - public Form1099BaseResponse getForm1099BaseResponse() throws ClassCastException { - return (Form1099BaseResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1042SListItemResponse`. If the actual instance is not `Form1042SListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1042SListItemResponse` - * @throws ClassCastException if the instance is not `Form1042SListItemResponse` - */ - public Form1042SListItemResponse getForm1042SListItemResponse() throws ClassCastException { - return (Form1042SListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1095BListItemResponse`. If the actual instance is not `Form1095BListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1095BListItemResponse` - * @throws ClassCastException if the instance is not `Form1095BListItemResponse` - */ - public Form1095BListItemResponse getForm1095BListItemResponse() throws ClassCastException { - return (Form1095BListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099DivListItemResponse`. If the actual instance is not `Form1099DivListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099DivListItemResponse` - * @throws ClassCastException if the instance is not `Form1099DivListItemResponse` - */ - public Form1099DivListItemResponse getForm1099DivListItemResponse() throws ClassCastException { - return (Form1099DivListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099IntListItemResponse`. If the actual instance is not `Form1099IntListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099IntListItemResponse` - * @throws ClassCastException if the instance is not `Form1099IntListItemResponse` - */ - public Form1099IntListItemResponse getForm1099IntListItemResponse() throws ClassCastException { - return (Form1099IntListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099KListItemResponse`. If the actual instance is not `Form1099KListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099KListItemResponse` - * @throws ClassCastException if the instance is not `Form1099KListItemResponse` - */ - public Form1099KListItemResponse getForm1099KListItemResponse() throws ClassCastException { - return (Form1099KListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099MiscListItemResponse`. If the actual instance is not `Form1099MiscListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099MiscListItemResponse` - * @throws ClassCastException if the instance is not `Form1099MiscListItemResponse` - */ - public Form1099MiscListItemResponse getForm1099MiscListItemResponse() throws ClassCastException { - return (Form1099MiscListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099NecListItemResponse`. If the actual instance is not `Form1099NecListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099NecListItemResponse` - * @throws ClassCastException if the instance is not `Form1099NecListItemResponse` - */ - public Form1099NecListItemResponse getForm1099NecListItemResponse() throws ClassCastException { - return (Form1099NecListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099RListItemResponse`. If the actual instance is not `Form1099RListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099RListItemResponse` - * @throws ClassCastException if the instance is not `Form1099RListItemResponse` - */ - public Form1099RListItemResponse getForm1099RListItemResponse() throws ClassCastException { - return (Form1099RListItemResponse)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Create1099Form201Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Form1099BaseResponse - try { - Form1099BaseResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1042SListItemResponse - try { - Form1042SListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1095BListItemResponse - try { - Form1095BListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099DivListItemResponse - try { - Form1099DivListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099IntListItemResponse - try { - Form1099IntListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099KListItemResponse - try { - Form1099KListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099MiscListItemResponse - try { - Form1099MiscListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099NecListItemResponse - try { - Form1099NecListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099RListItemResponse - try { - Form1099RListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Create1099Form201Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of Create1099Form201Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of Create1099Form201Response - * @throws IOException if the JSON string is invalid with respect to Create1099Form201Response - */ - public static Create1099Form201Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Create1099Form201Response.class); - } - - /** - * Convert an instance of Create1099Form201Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CreateAndSendW9FormEmailRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateAndSendW9FormEmailRequest.java new file mode 100644 index 0000000..116b349 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateAndSendW9FormEmailRequest.java @@ -0,0 +1,413 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import Avalara.SDK.model.A1099.V2.W4FormMinimalRequest; +import Avalara.SDK.model.A1099.V2.W8BenEFormMinimalRequest; +import Avalara.SDK.model.A1099.V2.W8BenFormMinimalRequest; +import Avalara.SDK.model.A1099.V2.W8ImyFormMinimalRequest; +import Avalara.SDK.model.A1099.V2.W9FormMinimalRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import Avalara.SDK.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class CreateAndSendW9FormEmailRequest extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateAndSendW9FormEmailRequest.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAndSendW9FormEmailRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAndSendW9FormEmailRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterW4FormMinimalRequest = gson.getDelegateAdapter(this, TypeToken.get(W4FormMinimalRequest.class)); + final TypeAdapter adapterW8BenEFormMinimalRequest = gson.getDelegateAdapter(this, TypeToken.get(W8BenEFormMinimalRequest.class)); + final TypeAdapter adapterW8BenFormMinimalRequest = gson.getDelegateAdapter(this, TypeToken.get(W8BenFormMinimalRequest.class)); + final TypeAdapter adapterW8ImyFormMinimalRequest = gson.getDelegateAdapter(this, TypeToken.get(W8ImyFormMinimalRequest.class)); + final TypeAdapter adapterW9FormMinimalRequest = gson.getDelegateAdapter(this, TypeToken.get(W9FormMinimalRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAndSendW9FormEmailRequest value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `W4FormMinimalRequest` + if (value.getActualInstance() instanceof W4FormMinimalRequest) { + JsonElement element = adapterW4FormMinimalRequest.toJsonTree((W4FormMinimalRequest)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W8BenEFormMinimalRequest` + if (value.getActualInstance() instanceof W8BenEFormMinimalRequest) { + JsonElement element = adapterW8BenEFormMinimalRequest.toJsonTree((W8BenEFormMinimalRequest)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W8BenFormMinimalRequest` + if (value.getActualInstance() instanceof W8BenFormMinimalRequest) { + JsonElement element = adapterW8BenFormMinimalRequest.toJsonTree((W8BenFormMinimalRequest)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W8ImyFormMinimalRequest` + if (value.getActualInstance() instanceof W8ImyFormMinimalRequest) { + JsonElement element = adapterW8ImyFormMinimalRequest.toJsonTree((W8ImyFormMinimalRequest)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W9FormMinimalRequest` + if (value.getActualInstance() instanceof W9FormMinimalRequest) { + JsonElement element = adapterW9FormMinimalRequest.toJsonTree((W9FormMinimalRequest)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest"); + } + + @Override + public CreateAndSendW9FormEmailRequest read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize W4FormMinimalRequest + try { + // validate the JSON object to see if any exception is thrown + W4FormMinimalRequest.validateJsonElement(jsonElement); + actualAdapter = adapterW4FormMinimalRequest; + match++; + log.log(Level.FINER, "Input data matches schema 'W4FormMinimalRequest'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W4FormMinimalRequest failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W4FormMinimalRequest'", e); + } + // deserialize W8BenEFormMinimalRequest + try { + // validate the JSON object to see if any exception is thrown + W8BenEFormMinimalRequest.validateJsonElement(jsonElement); + actualAdapter = adapterW8BenEFormMinimalRequest; + match++; + log.log(Level.FINER, "Input data matches schema 'W8BenEFormMinimalRequest'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W8BenEFormMinimalRequest failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W8BenEFormMinimalRequest'", e); + } + // deserialize W8BenFormMinimalRequest + try { + // validate the JSON object to see if any exception is thrown + W8BenFormMinimalRequest.validateJsonElement(jsonElement); + actualAdapter = adapterW8BenFormMinimalRequest; + match++; + log.log(Level.FINER, "Input data matches schema 'W8BenFormMinimalRequest'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W8BenFormMinimalRequest failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W8BenFormMinimalRequest'", e); + } + // deserialize W8ImyFormMinimalRequest + try { + // validate the JSON object to see if any exception is thrown + W8ImyFormMinimalRequest.validateJsonElement(jsonElement); + actualAdapter = adapterW8ImyFormMinimalRequest; + match++; + log.log(Level.FINER, "Input data matches schema 'W8ImyFormMinimalRequest'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W8ImyFormMinimalRequest failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W8ImyFormMinimalRequest'", e); + } + // deserialize W9FormMinimalRequest + try { + // validate the JSON object to see if any exception is thrown + W9FormMinimalRequest.validateJsonElement(jsonElement); + actualAdapter = adapterW9FormMinimalRequest; + match++; + log.log(Level.FINER, "Input data matches schema 'W9FormMinimalRequest'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W9FormMinimalRequest failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W9FormMinimalRequest'", e); + } + + if (match == 1) { + CreateAndSendW9FormEmailRequest ret = new CreateAndSendW9FormEmailRequest(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for CreateAndSendW9FormEmailRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public CreateAndSendW9FormEmailRequest() { + super("oneOf", Boolean.FALSE); + } + + public CreateAndSendW9FormEmailRequest(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("W4FormMinimalRequest", W4FormMinimalRequest.class); + schemas.put("W8BenEFormMinimalRequest", W8BenEFormMinimalRequest.class); + schemas.put("W8BenFormMinimalRequest", W8BenFormMinimalRequest.class); + schemas.put("W8ImyFormMinimalRequest", W8ImyFormMinimalRequest.class); + schemas.put("W9FormMinimalRequest", W9FormMinimalRequest.class); + } + + @Override + public Map> getSchemas() { + return CreateAndSendW9FormEmailRequest.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof W4FormMinimalRequest) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W8BenEFormMinimalRequest) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W8BenFormMinimalRequest) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W8ImyFormMinimalRequest) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W9FormMinimalRequest) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest"); + } + + /** + * Get the actual instance, which can be the following: + * W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest + * + * @return The actual instance (W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `W4FormMinimalRequest`. If the actual instance is not `W4FormMinimalRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W4FormMinimalRequest` + * @throws ClassCastException if the instance is not `W4FormMinimalRequest` + */ + public W4FormMinimalRequest getW4FormMinimalRequest() throws ClassCastException { + return (W4FormMinimalRequest)super.getActualInstance(); + } + /** + * Get the actual instance of `W8BenEFormMinimalRequest`. If the actual instance is not `W8BenEFormMinimalRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W8BenEFormMinimalRequest` + * @throws ClassCastException if the instance is not `W8BenEFormMinimalRequest` + */ + public W8BenEFormMinimalRequest getW8BenEFormMinimalRequest() throws ClassCastException { + return (W8BenEFormMinimalRequest)super.getActualInstance(); + } + /** + * Get the actual instance of `W8BenFormMinimalRequest`. If the actual instance is not `W8BenFormMinimalRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W8BenFormMinimalRequest` + * @throws ClassCastException if the instance is not `W8BenFormMinimalRequest` + */ + public W8BenFormMinimalRequest getW8BenFormMinimalRequest() throws ClassCastException { + return (W8BenFormMinimalRequest)super.getActualInstance(); + } + /** + * Get the actual instance of `W8ImyFormMinimalRequest`. If the actual instance is not `W8ImyFormMinimalRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W8ImyFormMinimalRequest` + * @throws ClassCastException if the instance is not `W8ImyFormMinimalRequest` + */ + public W8ImyFormMinimalRequest getW8ImyFormMinimalRequest() throws ClassCastException { + return (W8ImyFormMinimalRequest)super.getActualInstance(); + } + /** + * Get the actual instance of `W9FormMinimalRequest`. If the actual instance is not `W9FormMinimalRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W9FormMinimalRequest` + * @throws ClassCastException if the instance is not `W9FormMinimalRequest` + */ + public W9FormMinimalRequest getW9FormMinimalRequest() throws ClassCastException { + return (W9FormMinimalRequest)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateAndSendW9FormEmailRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with W4FormMinimalRequest + try { + W4FormMinimalRequest.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W4FormMinimalRequest failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W8BenEFormMinimalRequest + try { + W8BenEFormMinimalRequest.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W8BenEFormMinimalRequest failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W8BenFormMinimalRequest + try { + W8BenFormMinimalRequest.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W8BenFormMinimalRequest failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W8ImyFormMinimalRequest + try { + W8ImyFormMinimalRequest.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W8ImyFormMinimalRequest failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W9FormMinimalRequest + try { + W9FormMinimalRequest.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W9FormMinimalRequest failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for CreateAndSendW9FormEmailRequest with oneOf schemas: W4FormMinimalRequest, W8BenEFormMinimalRequest, W8BenFormMinimalRequest, W8ImyFormMinimalRequest, W9FormMinimalRequest. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of CreateAndSendW9FormEmailRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAndSendW9FormEmailRequest + * @throws IOException if the JSON string is invalid with respect to CreateAndSendW9FormEmailRequest + */ + public static CreateAndSendW9FormEmailRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAndSendW9FormEmailRequest.class); + } + + /** + * Convert an instance of CreateAndSendW9FormEmailRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseErrorsInner.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateCompanyRequest.java similarity index 60% rename from src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseErrorsInner.java rename to src/main/java/Avalara/SDK/model/A1099/V2/CreateCompanyRequest.java index 2bdc27b..3902762 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseErrorsInner.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateCompanyRequest.java @@ -20,18 +20,16 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; -import Avalara.SDK.model.A1099.V2.HttpValidationProblemDetails; -import Avalara.SDK.model.A1099.V2.ProblemDetails; +import Avalara.SDK.model.A1099.V2.CompanyCreateUpdateRequestModel; +import Avalara.SDK.model.A1099.V2.CompanyResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; @@ -70,45 +68,45 @@ import Avalara.SDK.JSON; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class ErrorResponseErrorsInner extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(ErrorResponseErrorsInner.class.getName()); +public class CreateCompanyRequest extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateCompanyRequest.class.getName()); public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ErrorResponseErrorsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ErrorResponseErrorsInner' and its subtypes + if (!CreateCompanyRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCompanyRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterProblemDetails = gson.getDelegateAdapter(this, TypeToken.get(ProblemDetails.class)); - final TypeAdapter adapterHttpValidationProblemDetails = gson.getDelegateAdapter(this, TypeToken.get(HttpValidationProblemDetails.class)); + final TypeAdapter adapterCompanyCreateUpdateRequestModel = gson.getDelegateAdapter(this, TypeToken.get(CompanyCreateUpdateRequestModel.class)); + final TypeAdapter adapterCompanyResponse = gson.getDelegateAdapter(this, TypeToken.get(CompanyResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ErrorResponseErrorsInner value) throws IOException { + public void write(JsonWriter out, CreateCompanyRequest value) throws IOException { if (value == null || value.getActualInstance() == null) { elementAdapter.write(out, null); return; } - // check if the actual instance is of the type `ProblemDetails` - if (value.getActualInstance() instanceof ProblemDetails) { - JsonElement element = adapterProblemDetails.toJsonTree((ProblemDetails)value.getActualInstance()); + // check if the actual instance is of the type `CompanyCreateUpdateRequestModel` + if (value.getActualInstance() instanceof CompanyCreateUpdateRequestModel) { + JsonElement element = adapterCompanyCreateUpdateRequestModel.toJsonTree((CompanyCreateUpdateRequestModel)value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `HttpValidationProblemDetails` - if (value.getActualInstance() instanceof HttpValidationProblemDetails) { - JsonElement element = adapterHttpValidationProblemDetails.toJsonTree((HttpValidationProblemDetails)value.getActualInstance()); + // check if the actual instance is of the type `CompanyResponse` + if (value.getActualInstance() instanceof CompanyResponse) { + JsonElement element = adapterCompanyResponse.toJsonTree((CompanyResponse)value.getActualInstance()); elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: HttpValidationProblemDetails, ProblemDetails"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CompanyCreateUpdateRequestModel, CompanyResponse"); } @Override - public ErrorResponseErrorsInner read(JsonReader in) throws IOException { + public CreateCompanyRequest read(JsonReader in) throws IOException { Object deserialized = null; JsonElement jsonElement = elementAdapter.read(in); @@ -116,38 +114,38 @@ public ErrorResponseErrorsInner read(JsonReader in) throws IOException { ArrayList errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; - // deserialize ProblemDetails + // deserialize CompanyCreateUpdateRequestModel try { // validate the JSON object to see if any exception is thrown - ProblemDetails.validateJsonElement(jsonElement); - actualAdapter = adapterProblemDetails; + CompanyCreateUpdateRequestModel.validateJsonElement(jsonElement); + actualAdapter = adapterCompanyCreateUpdateRequestModel; match++; - log.log(Level.FINER, "Input data matches schema 'ProblemDetails'"); + log.log(Level.FINER, "Input data matches schema 'CompanyCreateUpdateRequestModel'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for ProblemDetails failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'ProblemDetails'", e); + errorMessages.add(String.format("Deserialization for CompanyCreateUpdateRequestModel failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CompanyCreateUpdateRequestModel'", e); } - // deserialize HttpValidationProblemDetails + // deserialize CompanyResponse try { // validate the JSON object to see if any exception is thrown - HttpValidationProblemDetails.validateJsonElement(jsonElement); - actualAdapter = adapterHttpValidationProblemDetails; + CompanyResponse.validateJsonElement(jsonElement); + actualAdapter = adapterCompanyResponse; match++; - log.log(Level.FINER, "Input data matches schema 'HttpValidationProblemDetails'"); + log.log(Level.FINER, "Input data matches schema 'CompanyResponse'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for HttpValidationProblemDetails failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'HttpValidationProblemDetails'", e); + errorMessages.add(String.format("Deserialization for CompanyResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'CompanyResponse'", e); } if (match == 1) { - ErrorResponseErrorsInner ret = new ErrorResponseErrorsInner(); + CreateCompanyRequest ret = new CreateCompanyRequest(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; } - throw new IOException(String.format("Failed deserialization for ErrorResponseErrorsInner: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format("Failed deserialization for CreateCompanyRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -156,52 +154,52 @@ public ErrorResponseErrorsInner read(JsonReader in) throws IOException { // store a list of schema names defined in oneOf public static final Map> schemas = new HashMap>(); - public ErrorResponseErrorsInner() { + public CreateCompanyRequest() { super("oneOf", Boolean.FALSE); } - public ErrorResponseErrorsInner(Object o) { + public CreateCompanyRequest(Object o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } static { - schemas.put("ProblemDetails", ProblemDetails.class); - schemas.put("HttpValidationProblemDetails", HttpValidationProblemDetails.class); + schemas.put("CompanyCreateUpdateRequestModel", CompanyCreateUpdateRequestModel.class); + schemas.put("CompanyResponse", CompanyResponse.class); } @Override public Map> getSchemas() { - return ErrorResponseErrorsInner.schemas; + return CreateCompanyRequest.schemas; } /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * HttpValidationProblemDetails, ProblemDetails + * CompanyCreateUpdateRequestModel, CompanyResponse * * It could be an instance of the 'oneOf' schemas. */ @Override public void setActualInstance(Object instance) { - if (instance instanceof ProblemDetails) { + if (instance instanceof CompanyCreateUpdateRequestModel) { super.setActualInstance(instance); return; } - if (instance instanceof HttpValidationProblemDetails) { + if (instance instanceof CompanyResponse) { super.setActualInstance(instance); return; } - throw new RuntimeException("Invalid instance type. Must be HttpValidationProblemDetails, ProblemDetails"); + throw new RuntimeException("Invalid instance type. Must be CompanyCreateUpdateRequestModel, CompanyResponse"); } /** * Get the actual instance, which can be the following: - * HttpValidationProblemDetails, ProblemDetails + * CompanyCreateUpdateRequestModel, CompanyResponse * - * @return The actual instance (HttpValidationProblemDetails, ProblemDetails) + * @return The actual instance (CompanyCreateUpdateRequestModel, CompanyResponse) */ @SuppressWarnings("unchecked") @Override @@ -210,70 +208,70 @@ public Object getActualInstance() { } /** - * Get the actual instance of `ProblemDetails`. If the actual instance is not `ProblemDetails`, + * Get the actual instance of `CompanyCreateUpdateRequestModel`. If the actual instance is not `CompanyCreateUpdateRequestModel`, * the ClassCastException will be thrown. * - * @return The actual instance of `ProblemDetails` - * @throws ClassCastException if the instance is not `ProblemDetails` + * @return The actual instance of `CompanyCreateUpdateRequestModel` + * @throws ClassCastException if the instance is not `CompanyCreateUpdateRequestModel` */ - public ProblemDetails getProblemDetails() throws ClassCastException { - return (ProblemDetails)super.getActualInstance(); + public CompanyCreateUpdateRequestModel getCompanyCreateUpdateRequestModel() throws ClassCastException { + return (CompanyCreateUpdateRequestModel)super.getActualInstance(); } /** - * Get the actual instance of `HttpValidationProblemDetails`. If the actual instance is not `HttpValidationProblemDetails`, + * Get the actual instance of `CompanyResponse`. If the actual instance is not `CompanyResponse`, * the ClassCastException will be thrown. * - * @return The actual instance of `HttpValidationProblemDetails` - * @throws ClassCastException if the instance is not `HttpValidationProblemDetails` + * @return The actual instance of `CompanyResponse` + * @throws ClassCastException if the instance is not `CompanyResponse` */ - public HttpValidationProblemDetails getHttpValidationProblemDetails() throws ClassCastException { - return (HttpValidationProblemDetails)super.getActualInstance(); + public CompanyResponse getCompanyResponse() throws ClassCastException { + return (CompanyResponse)super.getActualInstance(); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ErrorResponseErrorsInner + * @throws IOException if the JSON Element is invalid with respect to CreateCompanyRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { // validate oneOf schemas one by one int validCount = 0; ArrayList errorMessages = new ArrayList<>(); - // validate the json string with ProblemDetails + // validate the json string with CompanyCreateUpdateRequestModel try { - ProblemDetails.validateJsonElement(jsonElement); + CompanyCreateUpdateRequestModel.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for ProblemDetails failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for CompanyCreateUpdateRequestModel failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with HttpValidationProblemDetails + // validate the json string with CompanyResponse try { - HttpValidationProblemDetails.validateJsonElement(jsonElement); + CompanyResponse.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for HttpValidationProblemDetails failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for CompanyResponse failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for ErrorResponseErrorsInner with oneOf schemas: HttpValidationProblemDetails, ProblemDetails. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for CreateCompanyRequest with oneOf schemas: CompanyCreateUpdateRequestModel, CompanyResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } /** - * Create an instance of ErrorResponseErrorsInner given an JSON string + * Create an instance of CreateCompanyRequest given an JSON string * * @param jsonString JSON string - * @return An instance of ErrorResponseErrorsInner - * @throws IOException if the JSON string is invalid with respect to ErrorResponseErrorsInner + * @return An instance of CreateCompanyRequest + * @throws IOException if the JSON string is invalid with respect to CreateCompanyRequest */ - public static ErrorResponseErrorsInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ErrorResponseErrorsInner.class); + public static CreateCompanyRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCompanyRequest.class); } /** - * Convert an instance of ErrorResponseErrorsInner to an JSON string + * Convert an instance of CreateCompanyRequest to an JSON string * * @return JSON string */ diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CreateIssuerRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateIssuerRequest.java new file mode 100644 index 0000000..5475e6d --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateIssuerRequest.java @@ -0,0 +1,282 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import Avalara.SDK.model.A1099.V2.IssuerCommand; +import Avalara.SDK.model.A1099.V2.IssuerResponse; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import Avalara.SDK.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class CreateIssuerRequest extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateIssuerRequest.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateIssuerRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateIssuerRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterIssuerCommand = gson.getDelegateAdapter(this, TypeToken.get(IssuerCommand.class)); + final TypeAdapter adapterIssuerResponse = gson.getDelegateAdapter(this, TypeToken.get(IssuerResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateIssuerRequest value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `IssuerCommand` + if (value.getActualInstance() instanceof IssuerCommand) { + JsonElement element = adapterIssuerCommand.toJsonTree((IssuerCommand)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `IssuerResponse` + if (value.getActualInstance() instanceof IssuerResponse) { + JsonElement element = adapterIssuerResponse.toJsonTree((IssuerResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: IssuerCommand, IssuerResponse"); + } + + @Override + public CreateIssuerRequest read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize IssuerCommand + try { + // validate the JSON object to see if any exception is thrown + IssuerCommand.validateJsonElement(jsonElement); + actualAdapter = adapterIssuerCommand; + match++; + log.log(Level.FINER, "Input data matches schema 'IssuerCommand'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for IssuerCommand failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'IssuerCommand'", e); + } + // deserialize IssuerResponse + try { + // validate the JSON object to see if any exception is thrown + IssuerResponse.validateJsonElement(jsonElement); + actualAdapter = adapterIssuerResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'IssuerResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for IssuerResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'IssuerResponse'", e); + } + + if (match == 1) { + CreateIssuerRequest ret = new CreateIssuerRequest(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for CreateIssuerRequest: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public CreateIssuerRequest() { + super("oneOf", Boolean.FALSE); + } + + public CreateIssuerRequest(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("IssuerCommand", IssuerCommand.class); + schemas.put("IssuerResponse", IssuerResponse.class); + } + + @Override + public Map> getSchemas() { + return CreateIssuerRequest.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * IssuerCommand, IssuerResponse + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof IssuerCommand) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof IssuerResponse) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be IssuerCommand, IssuerResponse"); + } + + /** + * Get the actual instance, which can be the following: + * IssuerCommand, IssuerResponse + * + * @return The actual instance (IssuerCommand, IssuerResponse) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `IssuerCommand`. If the actual instance is not `IssuerCommand`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IssuerCommand` + * @throws ClassCastException if the instance is not `IssuerCommand` + */ + public IssuerCommand getIssuerCommand() throws ClassCastException { + return (IssuerCommand)super.getActualInstance(); + } + /** + * Get the actual instance of `IssuerResponse`. If the actual instance is not `IssuerResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IssuerResponse` + * @throws ClassCastException if the instance is not `IssuerResponse` + */ + public IssuerResponse getIssuerResponse() throws ClassCastException { + return (IssuerResponse)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateIssuerRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with IssuerCommand + try { + IssuerCommand.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for IssuerCommand failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with IssuerResponse + try { + IssuerResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for IssuerResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for CreateIssuerRequest with oneOf schemas: IssuerCommand, IssuerResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of CreateIssuerRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateIssuerRequest + * @throws IOException if the JSON string is invalid with respect to CreateIssuerRequest + */ + public static CreateIssuerRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateIssuerRequest.class); + } + + /** + * Convert an instance of CreateIssuerRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java index 19ae7f9..09dd31a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.EntryStatusResponse; import Avalara.SDK.model.A1099.V2.SubstantialUsOwnerResponse; import Avalara.SDK.model.A1099.V2.TinMatchStatusResponse; import Avalara.SDK.model.A1099.V2.W4FormResponse; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Data.java b/src/main/java/Avalara/SDK/model/A1099/V2/Data.java deleted file mode 100644 index 3c8bb1f..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Data.java +++ /dev/null @@ -1,303 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Attribute; -import Avalara.SDK.model.A1099.V2.Link; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Data - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Data { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private Attribute attributes; - - public static final String SERIALIZED_NAME_LINKS = "links"; - @SerializedName(SERIALIZED_NAME_LINKS) - private Link links; - - public Data() { - } - - public Data id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public Data type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public Data attributes(Attribute attributes) { - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - */ - @javax.annotation.Nullable - public Attribute getAttributes() { - return attributes; - } - - public void setAttributes(Attribute attributes) { - this.attributes = attributes; - } - - - public Data links(Link links) { - this.links = links; - return this; - } - - /** - * Get links - * @return links - */ - @javax.annotation.Nullable - public Link getLinks() { - return links; - } - - public void setLinks(Link links) { - this.links = links; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Data data = (Data) o; - return Objects.equals(this.id, data.id) && - Objects.equals(this.type, data.type) && - Objects.equals(this.attributes, data.attributes) && - Objects.equals(this.links, data.links); - } - - @Override - public int hashCode() { - return Objects.hash(id, type, attributes, links); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Data {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" links: ").append(toIndentedString(links)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("attributes"); - openapiFields.add("links"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Data - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Data.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Data is not found in the empty JSON string", Data.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Data.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Data` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - Attribute.validateJsonElement(jsonObj.get("attributes")); - } - // validate the optional field `links` - if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { - Link.validateJsonElement(jsonObj.get("links")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Data.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Data' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Data.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Data value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Data read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Data given an JSON string - * - * @param jsonString JSON string - * @return An instance of Data - * @throws IOException if the JSON string is invalid with respect to Data - */ - public static Data fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Data.class); - } - - /** - * Convert an instance of Data to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/StatusDetail.java b/src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java similarity index 76% rename from src/main/java/Avalara/SDK/model/A1099/V2/StatusDetail.java rename to src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java index 00712c4..3caad6b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StatusDetail.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java @@ -26,6 +26,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; @@ -54,56 +55,56 @@ import Avalara.SDK.JSON; /** - * StatusDetail + * Represents the entry status information for a W9 form. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class StatusDetail { - public static final String SERIALIZED_NAME_TIME = "time"; - @SerializedName(SERIALIZED_NAME_TIME) - private String time; - +public class EntryStatusResponse { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) private String status; - public StatusDetail() { + public static final String SERIALIZED_NAME_TIME = "time"; + @SerializedName(SERIALIZED_NAME_TIME) + private OffsetDateTime time; + + public EntryStatusResponse() { } - public StatusDetail time(String time) { - this.time = time; + public EntryStatusResponse status(String status) { + this.status = status; return this; } /** - * Get time - * @return time + * The form status. + * @return status */ @javax.annotation.Nullable - public String getTime() { - return time; + public String getStatus() { + return status; } - public void setTime(String time) { - this.time = time; + public void setStatus(String status) { + this.status = status; } - public StatusDetail status(String status) { - this.status = status; + public EntryStatusResponse time(OffsetDateTime time) { + this.time = time; return this; } /** - * Get status - * @return status + * The timestamp for the latest status update. + * @return time */ @javax.annotation.Nullable - public String getStatus() { - return status; + public OffsetDateTime getTime() { + return time; } - public void setStatus(String status) { - this.status = status; + public void setTime(OffsetDateTime time) { + this.time = time; } @@ -116,9 +117,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - StatusDetail statusDetail = (StatusDetail) o; - return Objects.equals(this.time, statusDetail.time) && - Objects.equals(this.status, statusDetail.status); + EntryStatusResponse entryStatusResponse = (EntryStatusResponse) o; + return Objects.equals(this.status, entryStatusResponse.status) && + Objects.equals(this.time, entryStatusResponse.time); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -127,7 +128,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(time, status); + return Objects.hash(status, time); } private static int hashCodeNullable(JsonNullable a) { @@ -140,9 +141,9 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class StatusDetail {\n"); - sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append("class EntryStatusResponse {\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); sb.append("}"); return sb.toString(); } @@ -165,8 +166,8 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("time"); openapiFields.add("status"); + openapiFields.add("time"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -176,26 +177,23 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StatusDetail + * @throws IOException if the JSON Element is invalid with respect to EntryStatusResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!StatusDetail.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StatusDetail is not found in the empty JSON string", StatusDetail.openapiRequiredFields.toString())); + if (!EntryStatusResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in EntryStatusResponse is not found in the empty JSON string", EntryStatusResponse.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!StatusDetail.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StatusDetail` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!EntryStatusResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EntryStatusResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("time") != null && !jsonObj.get("time").isJsonNull()) && !jsonObj.get("time").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time").toString())); - } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } @@ -205,22 +203,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!StatusDetail.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StatusDetail' and its subtypes + if (!EntryStatusResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'EntryStatusResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StatusDetail.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(EntryStatusResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, StatusDetail value) throws IOException { + public void write(JsonWriter out, EntryStatusResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public StatusDetail read(JsonReader in) throws IOException { + public EntryStatusResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -231,18 +229,18 @@ public StatusDetail read(JsonReader in) throws IOException { } /** - * Create an instance of StatusDetail given an JSON string + * Create an instance of EntryStatusResponse given an JSON string * * @param jsonString JSON string - * @return An instance of StatusDetail - * @throws IOException if the JSON string is invalid with respect to StatusDetail + * @return An instance of EntryStatusResponse + * @throws IOException if the JSON string is invalid with respect to EntryStatusResponse */ - public static StatusDetail fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StatusDetail.class); + public static EntryStatusResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, EntryStatusResponse.class); } /** - * Convert an instance of StatusDetail to an JSON string + * Convert an instance of EntryStatusResponse to an JSON string * * @return JSON string */ diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java index 26703d9..70e4f1d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java @@ -32,6 +32,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -63,17 +64,79 @@ import Avalara.SDK.JSON; /** - * Form1042S + * Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1042S { + /** + * Gets or Sets tinType + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EMPTY("Empty"), + + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"); + + private String value; + + TinTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; + @SerializedName(SERIALIZED_NAME_TIN_TYPE) + private TinTypeEnum tinType; + public static final String SERIALIZED_NAME_UNIQUE_FORM_ID = "uniqueFormId"; @SerializedName(SERIALIZED_NAME_UNIQUE_FORM_ID) private String uniqueFormId; public static final String SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH = "recipientDateOfBirth"; @SerializedName(SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH) - private OffsetDateTime recipientDateOfBirth; + private LocalDate recipientDateOfBirth; public static final String SERIALIZED_NAME_RECIPIENT_GIIN = "recipientGiin"; @SerializedName(SERIALIZED_NAME_RECIPIENT_GIIN) @@ -83,37 +146,553 @@ public class Form1042S { @SerializedName(SERIALIZED_NAME_RECIPIENT_FOREIGN_TIN) private String recipientForeignTin; + /** + * Limitation on Benefits (LOB) code for tax treaty purposes. Available values: - 01: Individual (Deprecated - valid only for tax years prior to 2019) - 02: Government - contracting state/political subdivision/local authority - 03: Tax exempt pension trust/Pension fund - 04: Tax exempt/Charitable organization - 05: Publicly-traded corporation - 06: Subsidiary of publicly-traded corporation - 07: Company that meets the ownership and base erosion test - 08: Company that meets the derivative benefits test - 09: Company with an item of income that meets the active trade or business test - 10: Discretionary determination - 11: Other - 12: No LOB article in treaty + */ + @JsonAdapter(LobCodeEnum.Adapter.class) + public enum LobCodeEnum { + _01("01"), + + _02("02"), + + _03("03"), + + _04("04"), + + _05("05"), + + _06("06"), + + _07("07"), + + _08("08"), + + _09("09"), + + _10("10"), + + _11("11"), + + _12("12"); + + private String value; + + LobCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LobCodeEnum fromValue(String value) { + for (LobCodeEnum b : LobCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LobCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LobCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LobCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LobCodeEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_LOB_CODE = "lobCode"; @SerializedName(SERIALIZED_NAME_LOB_CODE) - private String lobCode; + private LobCodeEnum lobCode; + + /** + * Income code. Available values: Interest: - 01: Interest paid by US obligors - general - 02: Interest paid on real property mortgages - 03: Interest paid to controlling foreign corporations - 04: Interest paid by foreign corporations - 05: Interest on tax-free covenant bonds - 22: Interest paid on deposit with a foreign branch of a domestic corporation or partnership - 29: Deposit interest - 30: Original issue discount (OID) - 31: Short-term OID - 33: Substitute payment - interest - 51: Interest paid on certain actively traded or publicly offered securities(1) - 54: Substitute payments - interest from certain actively traded or publicly offered securities(1) Dividend: - 06: Dividends paid by U.S. corporations - general - 07: Dividends qualifying for direct dividend rate - 08: Dividends paid by foreign corporations - 34: Substitute payment - dividends - 40: Other dividend equivalents under IRC section 871(m) (formerly 871(l)) - 52: Dividends paid on certain actively traded or publicly offered securities(1) - 53: Substitute payments - dividends from certain actively traded or publicly offered securities(1) - 56: Dividend equivalents under IRC section 871(m) as a result of applying the combined transaction rules Other: - 09: Capital gains - 10: Industrial royalties - 11: Motion picture or television copyright royalties - 12: Other royalties (for example, copyright, software, broadcasting, endorsement payments) - 13: Royalties paid on certain publicly offered securities(1) - 14: Real property income and natural resources royalties - 15: Pensions, annuities, alimony, and/or insurance premiums - 16: Scholarship or fellowship grants - 17: Compensation for independent personal services(2) - 18: Compensation for dependent personal services(2) - 19: Compensation for teaching(2) - 20: Compensation during studying and training(2) - 23: Other income - 24: Qualified investment entity (QIE) distributions of capital gains - 25: Trust distributions subject to IRC section 1445 - 26: Unsevered growing crops and timber distributions by a trust subject to IRC section 1445 - 27: Publicly traded partnership distributions subject to IRC section 1446 - 28: Gambling winnings(3) - 32: Notional principal contract income(4) - 35: Substitute payment - other - 36: Capital gains distributions - 37: Return of capital - 38: Eligible deferred compensation items subject to IRC section 877A(d)(1) - 39: Distributions from a nongrantor trust subject to IRC section 877A(f)(1) - 41: Guarantee of indebtedness - 42: Earnings as an artist or athlete - no central withholding agreement(5) - 43: Earnings as an artist or athlete - central withholding agreement(5) - 44: Specified Federal procurement payments - 50: Income previously reported under escrow procedure(6) - 55: Taxable death benefits on life insurance contracts - 57: Amount realized under IRC section 1446(f) - 58: Publicly traded partnership distributions-undetermined + */ + @JsonAdapter(IncomeCodeEnum.Adapter.class) + public enum IncomeCodeEnum { + _01("01"), + + _02("02"), + + _03("03"), + + _04("04"), + + _05("05"), + + _22("22"), + + _29("29"), + + _30("30"), + + _31("31"), + + _33("33"), + + _51("51"), + + _54("54"), + + _06("06"), + + _07("07"), + + _08("08"), + + _34("34"), + + _40("40"), + + _52("52"), + + _53("53"), + + _56("56"), + + _09("09"), + + _10("10"), + + _11("11"), + + _12("12"), + + _13("13"), + + _14("14"), + + _15("15"), + + _16("16"), + + _17("17"), + + _18("18"), + + _19("19"), + + _20("20"), + + _23("23"), + + _24("24"), + + _25("25"), + + _26("26"), + + _27("27"), + + _28("28"), + + _32("32"), + + _35("35"), + + _36("36"), + + _37("37"), + + _38("38"), + + _39("39"), + + _41("41"), + + _42("42"), + + _43("43"), + + _44("44"), + + _50("50"), + + _55("55"), + + _57("57"), + + _58("58"); + + private String value; + + IncomeCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IncomeCodeEnum fromValue(String value) { + for (IncomeCodeEnum b : IncomeCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final IncomeCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IncomeCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IncomeCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IncomeCodeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_INCOME_CODE = "incomeCode"; @SerializedName(SERIALIZED_NAME_INCOME_CODE) - private String incomeCode; + private IncomeCodeEnum incomeCode; public static final String SERIALIZED_NAME_GROSS_INCOME = "grossIncome"; @SerializedName(SERIALIZED_NAME_GROSS_INCOME) private Double grossIncome; + /** + * Withholding indicator Available values: - 3: Chapter 3 - 4: Chapter 4 + */ + @JsonAdapter(WithholdingIndicatorEnum.Adapter.class) + public enum WithholdingIndicatorEnum { + _3("3"), + + _4("4"); + + private String value; + + WithholdingIndicatorEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WithholdingIndicatorEnum fromValue(String value) { + for (WithholdingIndicatorEnum b : WithholdingIndicatorEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WithholdingIndicatorEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WithholdingIndicatorEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WithholdingIndicatorEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WithholdingIndicatorEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_WITHHOLDING_INDICATOR = "withholdingIndicator"; @SerializedName(SERIALIZED_NAME_WITHHOLDING_INDICATOR) - private String withholdingIndicator; + private WithholdingIndicatorEnum withholdingIndicator; public static final String SERIALIZED_NAME_TAX_COUNTRY_CODE = "taxCountryCode"; @SerializedName(SERIALIZED_NAME_TAX_COUNTRY_CODE) private String taxCountryCode; + /** + * Exemption code (Chapter 3). Required if WithholdingIndicator is 3 (Chapter 3). Required when using TaxRateChap3. Available values: - Empty: Tax rate is due to backup withholding - 00: Not exempt - 01: Effectively connected income - 02: Exempt under IRC (other than portfolio interest) - 03: Income is not from US sources - 04: Exempt under tax treaty - 05: Portfolio interest exempt under IRC - 06: QI that assumes primary withholding responsibility - 07: WFP or WFT - 08: U.S. branch treated as U.S. Person - 09: Territory FI treated as U.S. Person - 10: QI represents that income is exempt - 11: QSL that assumes primary withholding responsibility - 12: Payee subjected to chapter 4 withholding - 22: QDD that assumes primary withholding responsibility - 23: Exempt under section 897(l) - 24: Exempt under section 892 + */ + @JsonAdapter(ExemptionCodeChap3Enum.Adapter.class) + public enum ExemptionCodeChap3Enum { + _00("00"), + + _01("01"), + + _02("02"), + + _03("03"), + + _04("04"), + + _05("05"), + + _06("06"), + + _07("07"), + + _08("08"), + + _09("09"), + + _10("10"), + + _11("11"), + + _12("12"), + + _22("22"), + + _23("23"), + + _24("24"); + + private String value; + + ExemptionCodeChap3Enum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ExemptionCodeChap3Enum fromValue(String value) { + for (ExemptionCodeChap3Enum b : ExemptionCodeChap3Enum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ExemptionCodeChap3Enum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ExemptionCodeChap3Enum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ExemptionCodeChap3Enum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ExemptionCodeChap3Enum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP3 = "exemptionCodeChap3"; @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP3) - private String exemptionCodeChap3; + private ExemptionCodeChap3Enum exemptionCodeChap3; + + /** + * Exemption code (Chapter 4). Required if WithholdingIndicator is 4 (Chapter 4). Available values: - 00: Not exempt - 13: Grandfathered payment - 14: Effectively connected income - 15: Payee not subject to chapter 4 withholding - 16: Excluded nonfinancial payment - 17: Foreign Entity that assumes primary withholding responsibility - 18: U.S. Payees - of participating FFI or registered deemed - compliant FFI - 19: Exempt from withholding under IGA(6) - 20: Dormant account(7) - 21: Other - payment not subject to chapter 4 withholding + */ + @JsonAdapter(ExemptionCodeChap4Enum.Adapter.class) + public enum ExemptionCodeChap4Enum { + _00("00"), + + _13("13"), + + _14("14"), + + _15("15"), + + _16("16"), + + _17("17"), + + _18("18"), + + _19("19"), + + _20("20"), + + _21("21"); + + private String value; + + ExemptionCodeChap4Enum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ExemptionCodeChap4Enum fromValue(String value) { + for (ExemptionCodeChap4Enum b : ExemptionCodeChap4Enum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ExemptionCodeChap4Enum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ExemptionCodeChap4Enum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ExemptionCodeChap4Enum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ExemptionCodeChap4Enum.fromValue(value); + } + } public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP4 = "exemptionCodeChap4"; @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP4) - private String exemptionCodeChap4; + private ExemptionCodeChap4Enum exemptionCodeChap4; + + /** + * Tax rate (Chapter 3) - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 00.00: 0.00% - 02.00: 2.00% - 04.00: 4.00% - 04.90: 4.90% - 04.95: 4.95% - 05.00: 5.00% - 07.00: 7.00% - 08.00: 8.00% - 10.00: 10.00% - 12.00: 12.00% - 12.50: 12.50% - 14.00: 14.00% - 15.00: 15.00% - 17.50: 17.50% - 20.00: 20.00% - 21.00: 21.00% - 24.00: 24.00% - 25.00: 25.00% - 27.50: 27.50% - 28.00: 28.00% - 30.00: 30.00% - 37.00: 37.00% + */ + @JsonAdapter(TaxRateChap3Enum.Adapter.class) + public enum TaxRateChap3Enum { + _00_00("00.00"), + + _02_00("02.00"), + + _04_00("04.00"), + + _04_90("04.90"), + + _04_95("04.95"), + + _05_00("05.00"), + + _07_00("07.00"), + + _08_00("08.00"), + + _10_00("10.00"), + + _12_00("12.00"), + + _12_50("12.50"), + + _14_00("14.00"), + + _15_00("15.00"), + + _17_50("17.50"), + + _20_00("20.00"), + + _21_00("21.00"), + + _24_00("24.00"), + + _25_00("25.00"), + + _27_50("27.50"), + + _28_00("28.00"), + + _30_00("30.00"), + + _37_00("37.00"); + + private String value; + + TaxRateChap3Enum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TaxRateChap3Enum fromValue(String value) { + for (TaxRateChap3Enum b : TaxRateChap3Enum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TaxRateChap3Enum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TaxRateChap3Enum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TaxRateChap3Enum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TaxRateChap3Enum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TAX_RATE_CHAP3 = "taxRateChap3"; @SerializedName(SERIALIZED_NAME_TAX_RATE_CHAP3) - private String taxRateChap3; + private TaxRateChap3Enum taxRateChap3; public static final String SERIALIZED_NAME_WITHHOLDING_ALLOWANCE = "withholdingAllowance"; @SerializedName(SERIALIZED_NAME_WITHHOLDING_ALLOWANCE) @@ -143,13 +722,285 @@ public class Form1042S { @SerializedName(SERIALIZED_NAME_TAX_PAID_AGENT) private Double taxPaidAgent; + /** + * Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3) Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary + */ + @JsonAdapter(Chap3StatusCodeEnum.Adapter.class) + public enum Chap3StatusCodeEnum { + _01("01"), + + _02("02"), + + _34("34"), + + _03("03"), + + _04("04"), + + _05("05"), + + _06("06"), + + _07("07"), + + _08("08"), + + _09("09"), + + _10("10"), + + _11("11"), + + _12("12"), + + _13("13"), + + _14("14"), + + _15("15"), + + _16("16"), + + _17("17"), + + _18("18"), + + _19("19"), + + _20("20"), + + _21("21"), + + _22("22"), + + _23("23"), + + _24("24"), + + _25("25"), + + _26("26"), + + _27("27"), + + _28("28"), + + _29("29"), + + _30("30"), + + _31("31"), + + _32("32"), + + _35("35"), + + _36("36"), + + _37("37"), + + _38("38"), + + _39("39"); + + private String value; + + Chap3StatusCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Chap3StatusCodeEnum fromValue(String value) { + for (Chap3StatusCodeEnum b : Chap3StatusCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Chap3StatusCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Chap3StatusCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Chap3StatusCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Chap3StatusCodeEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_CHAP3_STATUS_CODE = "chap3StatusCode"; @SerializedName(SERIALIZED_NAME_CHAP3_STATUS_CODE) - private String chap3StatusCode; + private Chap3StatusCodeEnum chap3StatusCode; + + /** + * Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI + */ + @JsonAdapter(Chap4StatusCodeEnum.Adapter.class) + public enum Chap4StatusCodeEnum { + _01("01"), + + _02("02"), + + _03("03"), + + _04("04"), + + _05("05"), + + _06("06"), + + _07("07"), + + _08("08"), + + _09("09"), + + _10("10"), + + _11("11"), + + _12("12"), + + _13("13"), + + _14("14"), + + _15("15"), + + _16("16"), + + _17("17"), + + _18("18"), + + _19("19"), + + _20("20"), + + _21("21"), + + _22("22"), + + _23("23"), + + _24("24"), + + _25("25"), + + _26("26"), + + _27("27"), + + _28("28"), + + _29("29"), + + _30("30"), + + _31("31"), + + _32("32"), + + _33("33"), + + _34("34"), + + _35("35"), + + _36("36"), + + _37("37"), + + _38("38"), + + _39("39"), + + _40("40"), + + _41("41"), + + _42("42"), + + _43("43"), + + _44("44"), + + _45("45"), + + _46("46"), + + _47("47"), + + _48("48"), + + _49("49"), + + _50("50"); + + private String value; + + Chap4StatusCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Chap4StatusCodeEnum fromValue(String value) { + for (Chap4StatusCodeEnum b : Chap4StatusCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Chap4StatusCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Chap4StatusCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Chap4StatusCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Chap4StatusCodeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_CHAP4_STATUS_CODE = "chap4StatusCode"; @SerializedName(SERIALIZED_NAME_CHAP4_STATUS_CODE) - private String chap4StatusCode; + private Chap4StatusCodeEnum chap4StatusCode; public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT = "primaryWithholdingAgent"; @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT) @@ -159,17 +1010,83 @@ public class Form1042S { @SerializedName(SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH) private IntermediaryOrFlowThrough intermediaryOrFlowThrough; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; + /** + * Form type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1099_NEC("1099-NEC"), + + _1099_MISC("1099-MISC"), + + _1099_DIV("1099-DIV"), + + _1099_R("1099-R"), + + _1099_K("1099-K"), + + _1095_B("1095-B"), + + _1042_S("1042-S"), + + _1095_C("1095-C"), + + _1099_INT("1099-INT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private String type; + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; + private String issuerId; public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) @@ -183,78 +1100,14 @@ public class Form1042S { @SerializedName(SERIALIZED_NAME_TAX_YEAR) private Integer taxYear; - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private Form1099StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private Form1099StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private Form1099StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private Form1099StatusDetail eDeliveryStatus; - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; @SerializedName(SERIALIZED_NAME_REFERENCE_ID) private String referenceId; - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - public static final String SERIALIZED_NAME_TIN = "tin"; @SerializedName(SERIALIZED_NAME_TIN) private String tin; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) private String recipientName; @@ -283,6 +1136,18 @@ public class Form1042S { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -291,13 +1156,65 @@ public class Form1042S { @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) private String countryCode; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) @@ -311,20 +1228,54 @@ public class Form1042S { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholding stateAndLocalWithholding; - public Form1042S() { } + public Form1042S( + TinTypeEnum tinType, + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + this.tinType = tinType; + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + /** + * Get tinType + * @return tinType + */ + @javax.annotation.Nullable + public TinTypeEnum getTinType() { + return tinType; + } + + + public Form1042S uniqueFormId(String uniqueFormId) { this.uniqueFormId = uniqueFormId; return this; } /** - * Get uniqueFormId + * Unique form identifier * @return uniqueFormId */ @javax.annotation.Nullable @@ -337,21 +1288,21 @@ public void setUniqueFormId(String uniqueFormId) { } - public Form1042S recipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { + public Form1042S recipientDateOfBirth(LocalDate recipientDateOfBirth) { this.recipientDateOfBirth = recipientDateOfBirth; return this; } /** - * Get recipientDateOfBirth + * Recipient's date of birth * @return recipientDateOfBirth */ @javax.annotation.Nullable - public OffsetDateTime getRecipientDateOfBirth() { + public LocalDate getRecipientDateOfBirth() { return recipientDateOfBirth; } - public void setRecipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { + public void setRecipientDateOfBirth(LocalDate recipientDateOfBirth) { this.recipientDateOfBirth = recipientDateOfBirth; } @@ -362,7 +1313,7 @@ public Form1042S recipientGiin(String recipientGiin) { } /** - * Get recipientGiin + * Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'. * @return recipientGiin */ @javax.annotation.Nullable @@ -381,7 +1332,7 @@ public Form1042S recipientForeignTin(String recipientForeignTin) { } /** - * Get recipientForeignTin + * Recipient's foreign TIN. Required if email is specified, must fill either this or Chap3StatusCode. * @return recipientForeignTin */ @javax.annotation.Nullable @@ -394,40 +1345,40 @@ public void setRecipientForeignTin(String recipientForeignTin) { } - public Form1042S lobCode(String lobCode) { + public Form1042S lobCode(LobCodeEnum lobCode) { this.lobCode = lobCode; return this; } /** - * Get lobCode + * Limitation on Benefits (LOB) code for tax treaty purposes. Available values: - 01: Individual (Deprecated - valid only for tax years prior to 2019) - 02: Government - contracting state/political subdivision/local authority - 03: Tax exempt pension trust/Pension fund - 04: Tax exempt/Charitable organization - 05: Publicly-traded corporation - 06: Subsidiary of publicly-traded corporation - 07: Company that meets the ownership and base erosion test - 08: Company that meets the derivative benefits test - 09: Company with an item of income that meets the active trade or business test - 10: Discretionary determination - 11: Other - 12: No LOB article in treaty * @return lobCode */ @javax.annotation.Nullable - public String getLobCode() { + public LobCodeEnum getLobCode() { return lobCode; } - public void setLobCode(String lobCode) { + public void setLobCode(LobCodeEnum lobCode) { this.lobCode = lobCode; } - public Form1042S incomeCode(String incomeCode) { + public Form1042S incomeCode(IncomeCodeEnum incomeCode) { this.incomeCode = incomeCode; return this; } /** - * Get incomeCode + * Income code. Available values: Interest: - 01: Interest paid by US obligors - general - 02: Interest paid on real property mortgages - 03: Interest paid to controlling foreign corporations - 04: Interest paid by foreign corporations - 05: Interest on tax-free covenant bonds - 22: Interest paid on deposit with a foreign branch of a domestic corporation or partnership - 29: Deposit interest - 30: Original issue discount (OID) - 31: Short-term OID - 33: Substitute payment - interest - 51: Interest paid on certain actively traded or publicly offered securities(1) - 54: Substitute payments - interest from certain actively traded or publicly offered securities(1) Dividend: - 06: Dividends paid by U.S. corporations - general - 07: Dividends qualifying for direct dividend rate - 08: Dividends paid by foreign corporations - 34: Substitute payment - dividends - 40: Other dividend equivalents under IRC section 871(m) (formerly 871(l)) - 52: Dividends paid on certain actively traded or publicly offered securities(1) - 53: Substitute payments - dividends from certain actively traded or publicly offered securities(1) - 56: Dividend equivalents under IRC section 871(m) as a result of applying the combined transaction rules Other: - 09: Capital gains - 10: Industrial royalties - 11: Motion picture or television copyright royalties - 12: Other royalties (for example, copyright, software, broadcasting, endorsement payments) - 13: Royalties paid on certain publicly offered securities(1) - 14: Real property income and natural resources royalties - 15: Pensions, annuities, alimony, and/or insurance premiums - 16: Scholarship or fellowship grants - 17: Compensation for independent personal services(2) - 18: Compensation for dependent personal services(2) - 19: Compensation for teaching(2) - 20: Compensation during studying and training(2) - 23: Other income - 24: Qualified investment entity (QIE) distributions of capital gains - 25: Trust distributions subject to IRC section 1445 - 26: Unsevered growing crops and timber distributions by a trust subject to IRC section 1445 - 27: Publicly traded partnership distributions subject to IRC section 1446 - 28: Gambling winnings(3) - 32: Notional principal contract income(4) - 35: Substitute payment - other - 36: Capital gains distributions - 37: Return of capital - 38: Eligible deferred compensation items subject to IRC section 877A(d)(1) - 39: Distributions from a nongrantor trust subject to IRC section 877A(f)(1) - 41: Guarantee of indebtedness - 42: Earnings as an artist or athlete - no central withholding agreement(5) - 43: Earnings as an artist or athlete - central withholding agreement(5) - 44: Specified Federal procurement payments - 50: Income previously reported under escrow procedure(6) - 55: Taxable death benefits on life insurance contracts - 57: Amount realized under IRC section 1446(f) - 58: Publicly traded partnership distributions-undetermined * @return incomeCode */ @javax.annotation.Nullable - public String getIncomeCode() { + public IncomeCodeEnum getIncomeCode() { return incomeCode; } - public void setIncomeCode(String incomeCode) { + public void setIncomeCode(IncomeCodeEnum incomeCode) { this.incomeCode = incomeCode; } @@ -438,7 +1389,7 @@ public Form1042S grossIncome(Double grossIncome) { } /** - * Get grossIncome + * Gross income * @return grossIncome */ @javax.annotation.Nullable @@ -451,21 +1402,21 @@ public void setGrossIncome(Double grossIncome) { } - public Form1042S withholdingIndicator(String withholdingIndicator) { + public Form1042S withholdingIndicator(WithholdingIndicatorEnum withholdingIndicator) { this.withholdingIndicator = withholdingIndicator; return this; } /** - * Get withholdingIndicator + * Withholding indicator Available values: - 3: Chapter 3 - 4: Chapter 4 * @return withholdingIndicator */ @javax.annotation.Nullable - public String getWithholdingIndicator() { + public WithholdingIndicatorEnum getWithholdingIndicator() { return withholdingIndicator; } - public void setWithholdingIndicator(String withholdingIndicator) { + public void setWithholdingIndicator(WithholdingIndicatorEnum withholdingIndicator) { this.withholdingIndicator = withholdingIndicator; } @@ -476,7 +1427,7 @@ public Form1042S taxCountryCode(String taxCountryCode) { } /** - * Get taxCountryCode + * Country code * @return taxCountryCode */ @javax.annotation.Nullable @@ -489,59 +1440,59 @@ public void setTaxCountryCode(String taxCountryCode) { } - public Form1042S exemptionCodeChap3(String exemptionCodeChap3) { + public Form1042S exemptionCodeChap3(ExemptionCodeChap3Enum exemptionCodeChap3) { this.exemptionCodeChap3 = exemptionCodeChap3; return this; } /** - * Get exemptionCodeChap3 + * Exemption code (Chapter 3). Required if WithholdingIndicator is 3 (Chapter 3). Required when using TaxRateChap3. Available values: - Empty: Tax rate is due to backup withholding - 00: Not exempt - 01: Effectively connected income - 02: Exempt under IRC (other than portfolio interest) - 03: Income is not from US sources - 04: Exempt under tax treaty - 05: Portfolio interest exempt under IRC - 06: QI that assumes primary withholding responsibility - 07: WFP or WFT - 08: U.S. branch treated as U.S. Person - 09: Territory FI treated as U.S. Person - 10: QI represents that income is exempt - 11: QSL that assumes primary withholding responsibility - 12: Payee subjected to chapter 4 withholding - 22: QDD that assumes primary withholding responsibility - 23: Exempt under section 897(l) - 24: Exempt under section 892 * @return exemptionCodeChap3 */ @javax.annotation.Nullable - public String getExemptionCodeChap3() { + public ExemptionCodeChap3Enum getExemptionCodeChap3() { return exemptionCodeChap3; } - public void setExemptionCodeChap3(String exemptionCodeChap3) { + public void setExemptionCodeChap3(ExemptionCodeChap3Enum exemptionCodeChap3) { this.exemptionCodeChap3 = exemptionCodeChap3; } - public Form1042S exemptionCodeChap4(String exemptionCodeChap4) { + public Form1042S exemptionCodeChap4(ExemptionCodeChap4Enum exemptionCodeChap4) { this.exemptionCodeChap4 = exemptionCodeChap4; return this; } /** - * Get exemptionCodeChap4 + * Exemption code (Chapter 4). Required if WithholdingIndicator is 4 (Chapter 4). Available values: - 00: Not exempt - 13: Grandfathered payment - 14: Effectively connected income - 15: Payee not subject to chapter 4 withholding - 16: Excluded nonfinancial payment - 17: Foreign Entity that assumes primary withholding responsibility - 18: U.S. Payees - of participating FFI or registered deemed - compliant FFI - 19: Exempt from withholding under IGA(6) - 20: Dormant account(7) - 21: Other - payment not subject to chapter 4 withholding * @return exemptionCodeChap4 */ @javax.annotation.Nullable - public String getExemptionCodeChap4() { + public ExemptionCodeChap4Enum getExemptionCodeChap4() { return exemptionCodeChap4; } - public void setExemptionCodeChap4(String exemptionCodeChap4) { + public void setExemptionCodeChap4(ExemptionCodeChap4Enum exemptionCodeChap4) { this.exemptionCodeChap4 = exemptionCodeChap4; } - public Form1042S taxRateChap3(String taxRateChap3) { + public Form1042S taxRateChap3(TaxRateChap3Enum taxRateChap3) { this.taxRateChap3 = taxRateChap3; return this; } /** - * Get taxRateChap3 + * Tax rate (Chapter 3) - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 00.00: 0.00% - 02.00: 2.00% - 04.00: 4.00% - 04.90: 4.90% - 04.95: 4.95% - 05.00: 5.00% - 07.00: 7.00% - 08.00: 8.00% - 10.00: 10.00% - 12.00: 12.00% - 12.50: 12.50% - 14.00: 14.00% - 15.00: 15.00% - 17.50: 17.50% - 20.00: 20.00% - 21.00: 21.00% - 24.00: 24.00% - 25.00: 25.00% - 27.50: 27.50% - 28.00: 28.00% - 30.00: 30.00% - 37.00: 37.00% * @return taxRateChap3 */ @javax.annotation.Nullable - public String getTaxRateChap3() { + public TaxRateChap3Enum getTaxRateChap3() { return taxRateChap3; } - public void setTaxRateChap3(String taxRateChap3) { + public void setTaxRateChap3(TaxRateChap3Enum taxRateChap3) { this.taxRateChap3 = taxRateChap3; } @@ -552,7 +1503,7 @@ public Form1042S withholdingAllowance(Double withholdingAllowance) { } /** - * Get withholdingAllowance + * Withholding allowance * @return withholdingAllowance */ @javax.annotation.Nullable @@ -571,7 +1522,7 @@ public Form1042S federalTaxWithheld(Double federalTaxWithheld) { } /** - * Get federalTaxWithheld + * Federal tax withheld * @return federalTaxWithheld */ @javax.annotation.Nullable @@ -590,7 +1541,7 @@ public Form1042S taxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { } /** - * Get taxNotDepositedIndicator + * Tax not deposited indicator * @return taxNotDepositedIndicator */ @javax.annotation.Nullable @@ -609,7 +1560,7 @@ public Form1042S academicIndicator(Boolean academicIndicator) { } /** - * Get academicIndicator + * Academic indicator * @return academicIndicator */ @javax.annotation.Nullable @@ -628,7 +1579,7 @@ public Form1042S taxWithheldOtherAgents(Double taxWithheldOtherAgents) { } /** - * Get taxWithheldOtherAgents + * Tax withheld by other agents * @return taxWithheldOtherAgents */ @javax.annotation.Nullable @@ -647,7 +1598,7 @@ public Form1042S amountRepaid(Double amountRepaid) { } /** - * Get amountRepaid + * Amount repaid to recipient * @return amountRepaid */ @javax.annotation.Nullable @@ -666,7 +1617,7 @@ public Form1042S taxPaidAgent(Double taxPaidAgent) { } /** - * Get taxPaidAgent + * Tax paid by withholding agent * @return taxPaidAgent */ @javax.annotation.Nullable @@ -679,40 +1630,40 @@ public void setTaxPaidAgent(Double taxPaidAgent) { } - public Form1042S chap3StatusCode(String chap3StatusCode) { + public Form1042S chap3StatusCode(Chap3StatusCodeEnum chap3StatusCode) { this.chap3StatusCode = chap3StatusCode; return this; } /** - * Get chap3StatusCode + * Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3) Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary * @return chap3StatusCode */ @javax.annotation.Nullable - public String getChap3StatusCode() { + public Chap3StatusCodeEnum getChap3StatusCode() { return chap3StatusCode; } - public void setChap3StatusCode(String chap3StatusCode) { + public void setChap3StatusCode(Chap3StatusCodeEnum chap3StatusCode) { this.chap3StatusCode = chap3StatusCode; } - public Form1042S chap4StatusCode(String chap4StatusCode) { + public Form1042S chap4StatusCode(Chap4StatusCodeEnum chap4StatusCode) { this.chap4StatusCode = chap4StatusCode; return this; } /** - * Get chap4StatusCode + * Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI * @return chap4StatusCode */ @javax.annotation.Nullable - public String getChap4StatusCode() { + public Chap4StatusCodeEnum getChap4StatusCode() { return chap4StatusCode; } - public void setChap4StatusCode(String chap4StatusCode) { + public void setChap4StatusCode(Chap4StatusCodeEnum chap4StatusCode) { this.chap4StatusCode = chap4StatusCode; } @@ -723,7 +1674,7 @@ public Form1042S primaryWithholdingAgent(PrimaryWithholdingAgent primaryWithhold } /** - * Get primaryWithholdingAgent + * Primary withholding agent information * @return primaryWithholdingAgent */ @javax.annotation.Nullable @@ -742,7 +1693,7 @@ public Form1042S intermediaryOrFlowThrough(IntermediaryOrFlowThrough intermediar } /** - * Get intermediaryOrFlowThrough + * Intermediary or flow-through entity information * @return intermediaryOrFlowThrough */ @javax.annotation.Nullable @@ -755,59 +1706,51 @@ public void setIntermediaryOrFlowThrough(IntermediaryOrFlowThrough intermediaryO } - public Form1042S id(String id) { - this.id = id; + public Form1042S type(TypeEnum type) { + this.type = type; return this; } /** - * Get id - * @return id + * Form type + * @return type */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; } - - public Form1042S type(String type) { + public void setType(TypeEnum type) { this.type = type; - return this; } + /** - * Get type - * @return type + * Form ID. Unique identifier set when the record is created. + * @return id */ @javax.annotation.Nullable - public String getType() { - return type; + public String getId() { + return id; } - public void setType(String type) { - this.type = type; - } - public Form1042S issuerId(Integer issuerId) { + public Form1042S issuerId(String issuerId) { this.issuerId = issuerId; return this; } /** - * Get issuerId + * Issuer ID - only required when creating forms * @return issuerId */ @javax.annotation.Nullable - public Integer getIssuerId() { + public String getIssuerId() { return issuerId; } - public void setIssuerId(Integer issuerId) { + public void setIssuerId(String issuerId) { this.issuerId = issuerId; } @@ -818,7 +1761,7 @@ public Form1042S issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID - only required when creating forms * @return issuerReferenceId */ @javax.annotation.Nullable @@ -837,7 +1780,7 @@ public Form1042S issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN - readonly * @return issuerTin */ @javax.annotation.Nullable @@ -856,7 +1799,7 @@ public Form1042S taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax Year - only required when creating forms * @return taxYear */ @javax.annotation.Nullable @@ -869,239 +1812,174 @@ public void setTaxYear(Integer taxYear) { } - public Form1042S federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Get federalEfile - * @return federalEfile - */ - @javax.annotation.Nullable - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - public Form1042S federalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - return this; - } - - /** - * Get federalEfileStatus - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - public void setFederalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - } - - - public Form1042S stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - return this; - } - - /** - * Get stateEfile - * @return stateEfile - */ - @javax.annotation.Nullable - public Boolean getStateEfile() { - return stateEfile; - } - - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - } - - - public Form1042S stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1042S addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); + public Form1042S referenceId(String referenceId) { + this.referenceId = referenceId; return this; } /** - * Get stateEfileStatus - * @return stateEfileStatus + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId */ @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; + public String getReferenceId() { + return referenceId; } - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; } - public Form1042S postalMail(Boolean postalMail) { - this.postalMail = postalMail; + public Form1042S tin(String tin) { + this.tin = tin; return this; } /** - * Get postalMail - * @return postalMail + * Recipient's Federal Tax Identification Number (TIN). + * @return tin */ @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; + public String getTin() { + return tin; } - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; + public void setTin(String tin) { + this.tin = tin; } - public Form1042S postalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public Form1042S recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get postalMailStatus - * @return postalMailStatus + * Recipient name + * @return recipientName */ @javax.annotation.Nullable - public Form1099StatusDetail getPostalMailStatus() { - return postalMailStatus; + public String getRecipientName() { + return recipientName; } - public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } - public Form1042S tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public Form1042S recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; return this; } /** - * Get tinMatch - * @return tinMatch + * Recipient second name + * @return recipientSecondName */ @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; + public String getRecipientSecondName() { + return recipientSecondName; } - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; } - public Form1042S tinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public Form1042S address(String address) { + this.address = address; return this; } /** - * Get tinMatchStatus - * @return tinMatchStatus + * Address. + * @return address */ @javax.annotation.Nullable - public Form1099StatusDetail getTinMatchStatus() { - return tinMatchStatus; + public String getAddress() { + return address; } - public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public void setAddress(String address) { + this.address = address; } - public Form1042S addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public Form1042S address2(String address2) { + this.address2 = address2; return this; } /** - * Get addressVerification - * @return addressVerification + * Address line 2. + * @return address2 */ @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; + public String getAddress2() { + return address2; } - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public void setAddress2(String address2) { + this.address2 = address2; } - public Form1042S addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public Form1042S city(String city) { + this.city = city; return this; } /** - * Get addressVerificationStatus - * @return addressVerificationStatus + * City. + * @return city */ @javax.annotation.Nullable - public Form1099StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; + public String getCity() { + return city; } - public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public void setCity(String city) { + this.city = city; } - public Form1042S eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public Form1042S state(String state) { + this.state = state; return this; } /** - * Get eDeliveryStatus - * @return eDeliveryStatus + * Two-letter US state or Canadian province code (required for US/CA addresses). + * @return state */ @javax.annotation.Nullable - public Form1099StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; + public String getState() { + return state; } - public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public void setState(String state) { + this.state = state; } - public Form1042S referenceId(String referenceId) { - this.referenceId = referenceId; + public Form1042S zip(String zip) { + this.zip = zip; return this; } /** - * Get referenceId - * @return referenceId + * ZIP/postal code. + * @return zip */ @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; + public String getZip() { + return zip; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; + public void setZip(String zip) { + this.zip = zip; } @@ -1111,7 +1989,7 @@ public Form1042S email(String email) { } /** - * Get email + * Recipient's Contact email address. * @return email */ @javax.annotation.Nullable @@ -1124,325 +2002,321 @@ public void setEmail(String email) { } - public Form1042S tinType(String tinType) { - this.tinType = tinType; + public Form1042S accountNumber(String accountNumber) { + this.accountNumber = accountNumber; return this; } /** - * Get tinType - * @return tinType + * Account number + * @return accountNumber */ @javax.annotation.Nullable - public String getTinType() { - return tinType; + public String getAccountNumber() { + return accountNumber; } - public void setTinType(String tinType) { - this.tinType = tinType; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; } - public Form1042S fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public Form1042S officeCode(String officeCode) { + this.officeCode = officeCode; return this; } /** - * Get fatcaFilingRequirement - * @return fatcaFilingRequirement + * Office code + * @return officeCode */ @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; + public String getOfficeCode() { + return officeCode; } - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; } - public Form1042S tin(String tin) { - this.tin = tin; + public Form1042S nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get tin - * @return tin + * Province or region for non-US/CA addresses. + * @return nonUsProvince */ @javax.annotation.Nullable - public String getTin() { - return tin; + public String getNonUsProvince() { + return nonUsProvince; } - public void setTin(String tin) { - this.tin = tin; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } - public Form1042S noTin(Boolean noTin) { - this.noTin = noTin; + public Form1042S countryCode(String countryCode) { + this.countryCode = countryCode; return this; } /** - * Get noTin - * @return noTin + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public String getCountryCode() { + return countryCode; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; } - public Form1042S secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public Form1042S federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; return this; } /** - * Get secondTinNotice - * @return secondTinNotice + * Date when federal e-filing should be scheduled for this form + * @return federalEfileDate */ @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; + public LocalDate getFederalEfileDate() { + return federalEfileDate; } - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; } - public Form1042S recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1042S postalMail(Boolean postalMail) { + this.postalMail = postalMail; return this; } /** - * Get recipientName - * @return recipientName + * Boolean indicating that postal mailing to the recipient should be scheduled for this form + * @return postalMail */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public Boolean getPostalMail() { + return postalMail; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; } - public Form1042S recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public Form1042S stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; return this; } /** - * Get recipientSecondName - * @return recipientSecondName + * Date when state e-filing should be scheduled for this form + * @return stateEfileDate */ @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; + public LocalDate getStateEfileDate() { + return stateEfileDate; } - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; } - public Form1042S address(String address) { - this.address = address; + public Form1042S recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; return this; } /** - * Get address - * @return address + * Date when recipient e-delivery should be scheduled for this form + * @return recipientEdeliveryDate */ @javax.annotation.Nullable - public String getAddress() { - return address; + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; } - public void setAddress(String address) { - this.address = address; + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; } - public Form1042S address2(String address2) { - this.address2 = address2; + public Form1042S tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; return this; } /** - * Get address2 - * @return address2 + * Boolean indicating that TIN Matching should be scheduled for this form + * @return tinMatch */ @javax.annotation.Nullable - public String getAddress2() { - return address2; + public Boolean getTinMatch() { + return tinMatch; } - public void setAddress2(String address2) { - this.address2 = address2; + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; } - public Form1042S city(String city) { - this.city = city; + public Form1042S noTin(Boolean noTin) { + this.noTin = noTin; return this; } /** - * Get city - * @return city + * No TIN indicator + * @return noTin */ @javax.annotation.Nullable - public String getCity() { - return city; + public Boolean getNoTin() { + return noTin; } - public void setCity(String city) { - this.city = city; + public void setNoTin(Boolean noTin) { + this.noTin = noTin; } - public Form1042S state(String state) { - this.state = state; + public Form1042S addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * Get state - * @return state + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public String getState() { - return state; + public Boolean getAddressVerification() { + return addressVerification; } - public void setState(String state) { - this.state = state; + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } - public Form1042S zip(String zip) { - this.zip = zip; + public Form1042S stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; return this; } /** - * Get zip - * @return zip + * State and local withholding information + * @return stateAndLocalWithholding */ @javax.annotation.Nullable - public String getZip() { - return zip; + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; } - public void setZip(String zip) { - this.zip = zip; + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; } - public Form1042S nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; + public Form1042S secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; return this; } /** - * Get nonUsProvince - * @return nonUsProvince + * Second TIN notice + * @return secondTinNotice */ @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; + public Boolean getSecondTinNotice() { + return secondTinNotice; } - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; } - public Form1042S countryCode(String countryCode) { - this.countryCode = countryCode; - return this; + /** + * Federal e-file status + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; } + + /** - * Get countryCode - * @return countryCode + * State e-file status + * @return stateEfileStatus */ @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; + public List getStateEfileStatus() { + return stateEfileStatus; } - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - public Form1042S accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; + /** + * Postal mail to recipient status + * @return postalMailStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; } + + /** - * Get accountNumber - * @return accountNumber + * TIN Match status + * @return tinMatchStatus */ @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - public Form1042S officeCode(String officeCode) { - this.officeCode = officeCode; - return this; + /** + * Address verification status + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; } + + /** - * Get officeCode - * @return officeCode + * EDelivery status + * @return eDeliveryStatus */ @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; } - public Form1042S validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1042S addValidationErrorsItem(ValidationError validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } /** - * Get validationErrors + * Validation errors * @return validationErrors */ @javax.annotation.Nullable @@ -1450,18 +2324,10 @@ public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - public Form1042S createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } /** - * Get createdAt + * Date time when the record was created. * @return createdAt */ @javax.annotation.Nullable @@ -1469,18 +2335,10 @@ public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public Form1042S updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } /** - * Get updatedAt + * Date time when the record was last updated. * @return updatedAt */ @javax.annotation.Nullable @@ -1488,28 +2346,6 @@ public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1042S stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholding getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } @@ -1522,7 +2358,8 @@ public boolean equals(Object o) { return false; } Form1042S form1042S = (Form1042S) o; - return Objects.equals(this.uniqueFormId, form1042S.uniqueFormId) && + return Objects.equals(this.tinType, form1042S.tinType) && + Objects.equals(this.uniqueFormId, form1042S.uniqueFormId) && Objects.equals(this.recipientDateOfBirth, form1042S.recipientDateOfBirth) && Objects.equals(this.recipientGiin, form1042S.recipientGiin) && Objects.equals(this.recipientForeignTin, form1042S.recipientForeignTin) && @@ -1545,30 +2382,14 @@ public boolean equals(Object o) { Objects.equals(this.chap4StatusCode, form1042S.chap4StatusCode) && Objects.equals(this.primaryWithholdingAgent, form1042S.primaryWithholdingAgent) && Objects.equals(this.intermediaryOrFlowThrough, form1042S.intermediaryOrFlowThrough) && - Objects.equals(this.id, form1042S.id) && Objects.equals(this.type, form1042S.type) && + Objects.equals(this.id, form1042S.id) && Objects.equals(this.issuerId, form1042S.issuerId) && Objects.equals(this.issuerReferenceId, form1042S.issuerReferenceId) && Objects.equals(this.issuerTin, form1042S.issuerTin) && Objects.equals(this.taxYear, form1042S.taxYear) && - Objects.equals(this.federalEfile, form1042S.federalEfile) && - Objects.equals(this.federalEfileStatus, form1042S.federalEfileStatus) && - Objects.equals(this.stateEfile, form1042S.stateEfile) && - Objects.equals(this.stateEfileStatus, form1042S.stateEfileStatus) && - Objects.equals(this.postalMail, form1042S.postalMail) && - Objects.equals(this.postalMailStatus, form1042S.postalMailStatus) && - Objects.equals(this.tinMatch, form1042S.tinMatch) && - Objects.equals(this.tinMatchStatus, form1042S.tinMatchStatus) && - Objects.equals(this.addressVerification, form1042S.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1042S.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1042S.eDeliveryStatus) && Objects.equals(this.referenceId, form1042S.referenceId) && - Objects.equals(this.email, form1042S.email) && - Objects.equals(this.tinType, form1042S.tinType) && - Objects.equals(this.fatcaFilingRequirement, form1042S.fatcaFilingRequirement) && Objects.equals(this.tin, form1042S.tin) && - Objects.equals(this.noTin, form1042S.noTin) && - Objects.equals(this.secondTinNotice, form1042S.secondTinNotice) && Objects.equals(this.recipientName, form1042S.recipientName) && Objects.equals(this.recipientSecondName, form1042S.recipientSecondName) && Objects.equals(this.address, form1042S.address) && @@ -1576,14 +2397,29 @@ public boolean equals(Object o) { Objects.equals(this.city, form1042S.city) && Objects.equals(this.state, form1042S.state) && Objects.equals(this.zip, form1042S.zip) && - Objects.equals(this.nonUsProvince, form1042S.nonUsProvince) && - Objects.equals(this.countryCode, form1042S.countryCode) && + Objects.equals(this.email, form1042S.email) && Objects.equals(this.accountNumber, form1042S.accountNumber) && Objects.equals(this.officeCode, form1042S.officeCode) && + Objects.equals(this.nonUsProvince, form1042S.nonUsProvince) && + Objects.equals(this.countryCode, form1042S.countryCode) && + Objects.equals(this.federalEfileDate, form1042S.federalEfileDate) && + Objects.equals(this.postalMail, form1042S.postalMail) && + Objects.equals(this.stateEfileDate, form1042S.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1042S.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1042S.tinMatch) && + Objects.equals(this.noTin, form1042S.noTin) && + Objects.equals(this.addressVerification, form1042S.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1042S.stateAndLocalWithholding) && + Objects.equals(this.secondTinNotice, form1042S.secondTinNotice) && + Objects.equals(this.federalEfileStatus, form1042S.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1042S.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1042S.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1042S.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1042S.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1042S.eDeliveryStatus) && Objects.equals(this.validationErrors, form1042S.validationErrors) && Objects.equals(this.createdAt, form1042S.createdAt) && - Objects.equals(this.updatedAt, form1042S.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1042S.stateAndLocalWithholding); + Objects.equals(this.updatedAt, form1042S.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1592,7 +2428,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(uniqueFormId, recipientDateOfBirth, recipientGiin, recipientForeignTin, lobCode, incomeCode, grossIncome, withholdingIndicator, taxCountryCode, exemptionCodeChap3, exemptionCodeChap4, taxRateChap3, withholdingAllowance, federalTaxWithheld, taxNotDepositedIndicator, academicIndicator, taxWithheldOtherAgents, amountRepaid, taxPaidAgent, chap3StatusCode, chap4StatusCode, primaryWithholdingAgent, intermediaryOrFlowThrough, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, fatcaFilingRequirement, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(tinType, uniqueFormId, recipientDateOfBirth, recipientGiin, recipientForeignTin, lobCode, incomeCode, grossIncome, withholdingIndicator, taxCountryCode, exemptionCodeChap3, exemptionCodeChap4, taxRateChap3, withholdingAllowance, federalTaxWithheld, taxNotDepositedIndicator, academicIndicator, taxWithheldOtherAgents, amountRepaid, taxPaidAgent, chap3StatusCode, chap4StatusCode, primaryWithholdingAgent, intermediaryOrFlowThrough, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -1606,6 +2442,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Form1042S {\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" uniqueFormId: ").append(toIndentedString(uniqueFormId)).append("\n"); sb.append(" recipientDateOfBirth: ").append(toIndentedString(recipientDateOfBirth)).append("\n"); sb.append(" recipientGiin: ").append(toIndentedString(recipientGiin)).append("\n"); @@ -1629,30 +2466,14 @@ public String toString() { sb.append(" chap4StatusCode: ").append(toIndentedString(chap4StatusCode)).append("\n"); sb.append(" primaryWithholdingAgent: ").append(toIndentedString(primaryWithholdingAgent)).append("\n"); sb.append(" intermediaryOrFlowThrough: ").append(toIndentedString(intermediaryOrFlowThrough)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); @@ -1660,14 +2481,29 @@ public String toString() { sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1690,48 +2526,58 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("id"); openapiFields.add("type"); + openapiFields.add("id"); openapiFields.add("issuerId"); openapiFields.add("issuerReferenceId"); openapiFields.add("issuerTin"); openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); + openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); + openapiFields.add("email"); openapiFields.add("accountNumber"); openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("secondTinNotice"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("uniqueFormId"); + openapiRequiredFields.add("incomeCode"); + openapiRequiredFields.add("grossIncome"); + openapiRequiredFields.add("withholdingIndicator"); + openapiRequiredFields.add("taxCountryCode"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1754,7 +2600,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042S` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1042S.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } if ((jsonObj.get("uniqueFormId") != null && !jsonObj.get("uniqueFormId").isJsonNull()) && !jsonObj.get("uniqueFormId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uniqueFormId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uniqueFormId").toString())); } @@ -1767,30 +2627,58 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("lobCode") != null && !jsonObj.get("lobCode").isJsonNull()) && !jsonObj.get("lobCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `lobCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lobCode").toString())); } + // validate the optional field `lobCode` + if (jsonObj.get("lobCode") != null && !jsonObj.get("lobCode").isJsonNull()) { + LobCodeEnum.validateJsonElement(jsonObj.get("lobCode")); + } if ((jsonObj.get("incomeCode") != null && !jsonObj.get("incomeCode").isJsonNull()) && !jsonObj.get("incomeCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `incomeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("incomeCode").toString())); } + // validate the required field `incomeCode` + IncomeCodeEnum.validateJsonElement(jsonObj.get("incomeCode")); if ((jsonObj.get("withholdingIndicator") != null && !jsonObj.get("withholdingIndicator").isJsonNull()) && !jsonObj.get("withholdingIndicator").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `withholdingIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("withholdingIndicator").toString())); } + // validate the required field `withholdingIndicator` + WithholdingIndicatorEnum.validateJsonElement(jsonObj.get("withholdingIndicator")); if ((jsonObj.get("taxCountryCode") != null && !jsonObj.get("taxCountryCode").isJsonNull()) && !jsonObj.get("taxCountryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `taxCountryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxCountryCode").toString())); } if ((jsonObj.get("exemptionCodeChap3") != null && !jsonObj.get("exemptionCodeChap3").isJsonNull()) && !jsonObj.get("exemptionCodeChap3").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exemptionCodeChap3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptionCodeChap3").toString())); } + // validate the optional field `exemptionCodeChap3` + if (jsonObj.get("exemptionCodeChap3") != null && !jsonObj.get("exemptionCodeChap3").isJsonNull()) { + ExemptionCodeChap3Enum.validateJsonElement(jsonObj.get("exemptionCodeChap3")); + } if ((jsonObj.get("exemptionCodeChap4") != null && !jsonObj.get("exemptionCodeChap4").isJsonNull()) && !jsonObj.get("exemptionCodeChap4").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `exemptionCodeChap4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptionCodeChap4").toString())); } + // validate the optional field `exemptionCodeChap4` + if (jsonObj.get("exemptionCodeChap4") != null && !jsonObj.get("exemptionCodeChap4").isJsonNull()) { + ExemptionCodeChap4Enum.validateJsonElement(jsonObj.get("exemptionCodeChap4")); + } if ((jsonObj.get("taxRateChap3") != null && !jsonObj.get("taxRateChap3").isJsonNull()) && !jsonObj.get("taxRateChap3").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `taxRateChap3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxRateChap3").toString())); } + // validate the optional field `taxRateChap3` + if (jsonObj.get("taxRateChap3") != null && !jsonObj.get("taxRateChap3").isJsonNull()) { + TaxRateChap3Enum.validateJsonElement(jsonObj.get("taxRateChap3")); + } if ((jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) && !jsonObj.get("chap3StatusCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `chap3StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap3StatusCode").toString())); } + // validate the optional field `chap3StatusCode` + if (jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) { + Chap3StatusCodeEnum.validateJsonElement(jsonObj.get("chap3StatusCode")); + } if ((jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) && !jsonObj.get("chap4StatusCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `chap4StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap4StatusCode").toString())); } + // validate the optional field `chap4StatusCode` + if (jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) { + Chap4StatusCodeEnum.validateJsonElement(jsonObj.get("chap4StatusCode")); + } // validate the optional field `primaryWithholdingAgent` if (jsonObj.get("primaryWithholdingAgent") != null && !jsonObj.get("primaryWithholdingAgent").isJsonNull()) { PrimaryWithholdingAgent.validateJsonElement(jsonObj.get("primaryWithholdingAgent")); @@ -1799,11 +2687,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("intermediaryOrFlowThrough") != null && !jsonObj.get("intermediaryOrFlowThrough").isJsonNull()) { IntermediaryOrFlowThrough.validateJsonElement(jsonObj.get("intermediaryOrFlowThrough")); } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); } if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); @@ -1811,49 +2704,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } @@ -1878,17 +2731,58 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); @@ -1904,10 +2798,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SList.java deleted file mode 100644 index f03868b..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SList.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1042SListItem; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1042SList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1042SList { - public static final String SERIALIZED_NAME_FORMS = "forms"; - @SerializedName(SERIALIZED_NAME_FORMS) - private List forms; - - public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; - @SerializedName(SERIALIZED_NAME_FORM_TYPE) - private String formType; - - public Form1042SList() { - } - - public Form1042SList forms(List forms) { - this.forms = forms; - return this; - } - - public Form1042SList addFormsItem(Form1042SListItem formsItem) { - if (this.forms == null) { - this.forms = new ArrayList<>(); - } - this.forms.add(formsItem); - return this; - } - - /** - * Get forms - * @return forms - */ - @javax.annotation.Nullable - public List getForms() { - return forms; - } - - public void setForms(List forms) { - this.forms = forms; - } - - - public Form1042SList formType(String formType) { - this.formType = formType; - return this; - } - - /** - * Get formType - * @return formType - */ - @javax.annotation.Nullable - public String getFormType() { - return formType; - } - - public void setFormType(String formType) { - this.formType = formType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1042SList form1042SList = (Form1042SList) o; - return Objects.equals(this.forms, form1042SList.forms) && - Objects.equals(this.formType, form1042SList.formType); - } - - @Override - public int hashCode() { - return Objects.hash(forms, formType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1042SList {\n"); - sb.append(" forms: ").append(toIndentedString(forms)).append("\n"); - sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("formType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1042SList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1042SList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1042SList is not found in the empty JSON string", Form1042SList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1042SList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042SList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("forms") != null && !jsonObj.get("forms").isJsonNull()) { - JsonArray jsonArrayforms = jsonObj.getAsJsonArray("forms"); - if (jsonArrayforms != null) { - // ensure the json data is an array - if (!jsonObj.get("forms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `forms` to be an array in the JSON string but got `%s`", jsonObj.get("forms").toString())); - } - - // validate the optional field `forms` (array) - for (int i = 0; i < jsonArrayforms.size(); i++) { - Form1042SListItem.validateJsonElement(jsonArrayforms.get(i)); - }; - } - } - if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1042SList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1042SList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1042SList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1042SList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1042SList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1042SList given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1042SList - * @throws IOException if the JSON string is invalid with respect to Form1042SList - */ - public static Form1042SList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1042SList.class); - } - - /** - * Convert an instance of Form1042SList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItem.java deleted file mode 100644 index c651b4e..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItem.java +++ /dev/null @@ -1,2092 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough; -import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1042SListItem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1042SListItem { - public static final String SERIALIZED_NAME_UNIQUE_FORM_ID = "uniqueFormId"; - @SerializedName(SERIALIZED_NAME_UNIQUE_FORM_ID) - private String uniqueFormId; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH = "recipientDateOfBirth"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH) - private OffsetDateTime recipientDateOfBirth; - - public static final String SERIALIZED_NAME_RECIPIENT_GIIN = "recipientGiin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_GIIN) - private String recipientGiin; - - public static final String SERIALIZED_NAME_RECIPIENT_FOREIGN_TIN = "recipientForeignTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_FOREIGN_TIN) - private String recipientForeignTin; - - /** - * Limitation on benefits code - */ - @JsonAdapter(LobCodeEnum.Adapter.class) - public enum LobCodeEnum { - INDIVIDUAL("Individual"), - - GOVERNMENT_CONTRACTING_STATE("GovernmentContractingState"), - - TAX_EXEMPT_PENSION_TRUST("TaxExemptPensionTrust"), - - TAX_EXEMPT_CHARITABLE_ORGANIZATION("TaxExemptCharitableOrganization"), - - PUBLICLY_TRADED_CORPORATION("PubliclyTradedCorporation"), - - SUBSIDIARY_OF_PUBLICLY_TRADED_CORPORATION("SubsidiaryOfPubliclyTradedCorporation"), - - COMPANY_OWNERSHIP_BASE_EROSION_TEST("CompanyOwnershipBaseErosionTest"), - - COMPANY_DERIVATIVE_BENEFITS_TEST("CompanyDerivativeBenefitsTest"), - - COMPANY_ACTIVE_TRADE_OR_BUSINESS_TEST("CompanyActiveTradeOrBusinessTest"), - - DISCRETIONARY_DETERMINATION("DiscretionaryDetermination"), - - OTHER("Other"), - - NO_LOB_ARTICLE_IN_TREATY("NoLobArticleInTreaty"); - - private String value; - - LobCodeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static LobCodeEnum fromValue(String value) { - for (LobCodeEnum b : LobCodeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final LobCodeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public LobCodeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return LobCodeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - LobCodeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_LOB_CODE = "lobCode"; - @SerializedName(SERIALIZED_NAME_LOB_CODE) - private LobCodeEnum lobCode; - - public static final String SERIALIZED_NAME_INCOME_CODE = "incomeCode"; - @SerializedName(SERIALIZED_NAME_INCOME_CODE) - private String incomeCode; - - public static final String SERIALIZED_NAME_GROSS_INCOME = "grossIncome"; - @SerializedName(SERIALIZED_NAME_GROSS_INCOME) - private Double grossIncome; - - public static final String SERIALIZED_NAME_WITHHOLDING_INDICATOR = "withholdingIndicator"; - @SerializedName(SERIALIZED_NAME_WITHHOLDING_INDICATOR) - private String withholdingIndicator; - - public static final String SERIALIZED_NAME_TAX_COUNTRY_CODE = "taxCountryCode"; - @SerializedName(SERIALIZED_NAME_TAX_COUNTRY_CODE) - private String taxCountryCode; - - /** - * Exemption code (Chapter 3) - */ - @JsonAdapter(ExemptionCodeChap3Enum.Adapter.class) - public enum ExemptionCodeChap3Enum { - TAX_RATE_DUE_TO_BACKUP_WITHHOLDING("TaxRateDueToBackupWithholding"), - - EFFECTIVELY_CONNECTED_INCOME("EffectivelyConnectedIncome"), - - EXEMPT_UNDER_IRC("ExemptUnderIrc"), - - INCOME_NOT_FROM_US_SOURCES("IncomeNotFromUsSources"), - - EXEMPT_UNDER_TAX_TREATY("ExemptUnderTaxTreaty"), - - PORTFOLIO_INTEREST_EXEMPT_UNDER_IRC("PortfolioInterestExemptUnderIrc"), - - QI_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY("QiThatAssumesPrimaryWithholdingResponsibility"), - - WF_POR_WFT("WfPorWft"), - - US_BRANCH_TREATED_AS_US_PERSON("UsBranchTreatedAsUsPerson"), - - TERRITORY_FI_TREATED_AS_US_PERSON("TerritoryFiTreatedAsUsPerson"), - - QI_REPRESENTS_INCOME_EXEMPT("QiRepresentsIncomeExempt"), - - QSL_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY("QslThatAssumesPrimaryWithholdingResponsibility"), - - PAYEE_SUBJECTED_TO_CHAPTER4_WITHHOLDING("PayeeSubjectedToChapter4Withholding"), - - QDD_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY("QddThatAssumesPrimaryWithholdingResponsibility"), - - EXEMPT_UNDER_SECTION897_L("ExemptUnderSection897L"), - - EXEMPT_UNDER_SECTION892("ExemptUnderSection892"); - - private String value; - - ExemptionCodeChap3Enum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ExemptionCodeChap3Enum fromValue(String value) { - for (ExemptionCodeChap3Enum b : ExemptionCodeChap3Enum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ExemptionCodeChap3Enum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ExemptionCodeChap3Enum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ExemptionCodeChap3Enum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ExemptionCodeChap3Enum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP3 = "exemptionCodeChap3"; - @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP3) - private ExemptionCodeChap3Enum exemptionCodeChap3; - - /** - * Exemption code (Chapter 4) - */ - @JsonAdapter(ExemptionCodeChap4Enum.Adapter.class) - public enum ExemptionCodeChap4Enum { - NOT_EXEMPT("NotExempt"), - - GRANDFATHERED_PAYMENT("GrandfatheredPayment"), - - EFFECTIVELY_CONNECTED_INCOME("EffectivelyConnectedIncome"), - - PAYEE_NOT_SUBJECT_TO_CHAPTER4_WITHHOLDING("PayeeNotSubjectToChapter4Withholding"), - - EXCLUDED_NONFINANCIAL_PAYMENT("ExcludedNonfinancialPayment"), - - FOREIGN_ENTITY_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY("ForeignEntityThatAssumesPrimaryWithholdingResponsibility"), - - US_PAYEES_OF_PARTICIPATING_FFI("UsPayeesOfParticipatingFfi"), - - EXEMPT_FROM_WITHHOLDING_UNDER_IGA("ExemptFromWithholdingUnderIga"), - - DORMANT_ACCOUNT("DormantAccount"), - - OTHER_PAYMENT_NOT_SUBJECT_TO_CHAPTER4_WITHHOLDING("OtherPaymentNotSubjectToChapter4Withholding"); - - private String value; - - ExemptionCodeChap4Enum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ExemptionCodeChap4Enum fromValue(String value) { - for (ExemptionCodeChap4Enum b : ExemptionCodeChap4Enum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ExemptionCodeChap4Enum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ExemptionCodeChap4Enum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ExemptionCodeChap4Enum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ExemptionCodeChap4Enum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP4 = "exemptionCodeChap4"; - @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP4) - private ExemptionCodeChap4Enum exemptionCodeChap4; - - public static final String SERIALIZED_NAME_TAX_RATE_CHAP3 = "taxRateChap3"; - @SerializedName(SERIALIZED_NAME_TAX_RATE_CHAP3) - private String taxRateChap3; - - public static final String SERIALIZED_NAME_WITHHOLDING_ALLOWANCE = "withholdingAllowance"; - @SerializedName(SERIALIZED_NAME_WITHHOLDING_ALLOWANCE) - private Double withholdingAllowance; - - public static final String SERIALIZED_NAME_FEDERAL_TAX_WITHHELD = "federalTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_TAX_WITHHELD) - private Double federalTaxWithheld; - - public static final String SERIALIZED_NAME_TAX_NOT_DEPOSITED_INDICATOR = "taxNotDepositedIndicator"; - @SerializedName(SERIALIZED_NAME_TAX_NOT_DEPOSITED_INDICATOR) - private Boolean taxNotDepositedIndicator; - - public static final String SERIALIZED_NAME_ACADEMIC_INDICATOR = "academicIndicator"; - @SerializedName(SERIALIZED_NAME_ACADEMIC_INDICATOR) - private Boolean academicIndicator; - - public static final String SERIALIZED_NAME_TAX_WITHHELD_OTHER_AGENTS = "taxWithheldOtherAgents"; - @SerializedName(SERIALIZED_NAME_TAX_WITHHELD_OTHER_AGENTS) - private Double taxWithheldOtherAgents; - - public static final String SERIALIZED_NAME_AMOUNT_REPAID = "amountRepaid"; - @SerializedName(SERIALIZED_NAME_AMOUNT_REPAID) - private Double amountRepaid; - - public static final String SERIALIZED_NAME_TAX_PAID_AGENT = "taxPaidAgent"; - @SerializedName(SERIALIZED_NAME_TAX_PAID_AGENT) - private Double taxPaidAgent; - - /** - * Chapter 3 status code - */ - @JsonAdapter(Chap3StatusCodeEnum.Adapter.class) - public enum Chap3StatusCodeEnum { - US_WITHHOLDING_AGENT_FI("USWithholdingAgentFI"), - - US_WITHHOLDING_AGENT_OTHER("USWithholdingAgentOther"), - - TERRITORY_FI_TREATED_AS_US_PERSON("TerritoryFITreatedAsUSPerson"), - - TERRITORY_FI_NOT_TREATED_AS_US_PERSON("TerritoryFINotTreatedAsUSPerson"), - - US_BRANCH_TREATED_AS_US_PERSON("USBranchTreatedAsUSPerson"), - - US_BRANCH_NOT_TREATED_AS_US_PERSON("USBranchNotTreatedAsUSPerson"), - - US_BRANCH_ECI_PRESUMPTION_APPLIED("USBranchECIPresumptionApplied"), - - PARTNERSHIP_OTHER_THAN_WITHHOLDING_FOREIGN_PARTNERSHIP("PartnershipOtherThanWithholdingForeignPartnership"), - - WITHHOLDING_FOREIGN_PARTNERSHIP("WithholdingForeignPartnership"), - - TRUST_OTHER_THAN_WITHHOLDING_FOREIGN_TRUST("TrustOtherThanWithholdingForeignTrust"), - - WITHHOLDING_FOREIGN_TRUST("WithholdingForeignTrust"), - - QUALIFIED_INTERMEDIARY("QualifiedIntermediary"), - - QUALIFIED_SECURITIES_LENDER_QUALIFIED_INTERMEDIARY("QualifiedSecuritiesLenderQualifiedIntermediary"), - - QUALIFIED_SECURITIES_LENDER_OTHER("QualifiedSecuritiesLenderOther"), - - CORPORATION("Corporation"), - - INDIVIDUAL("Individual"), - - ESTATE("Estate"), - - PRIVATE_FOUNDATION("PrivateFoundation"), - - GOVERNMENT_OR_INTERNATIONAL_ORGANIZATION("GovernmentOrInternationalOrganization"), - - TAX_EXEMPT_ORGANIZATION_SECTION501C_ENTITIES("TaxExemptOrganizationSection501cEntities"), - - UNKNOWN_RECIPIENT("UnknownRecipient"), - - ARTIST_OR_ATHLETE("ArtistOrAthlete"), - - PENSION("Pension"), - - FOREIGN_CENTRAL_BANK_OF_ISSUE("ForeignCentralBankOfIssue"), - - NONQUALIFIED_INTERMEDIARY("NonqualifiedIntermediary"), - - HYBRID_ENTITY_MAKING_TREATY_CLAIM("HybridEntityMakingTreatyClaim"), - - WITHHOLDING_RATE_POOL_GENERAL("WithholdingRatePoolGeneral"), - - WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION("WithholdingRatePoolExemptOrganization"), - - PAI_WITHHOLDING_RATE_POOL_GENERAL("PAIWithholdingRatePoolGeneral"), - - PAI_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION("PAIWithholdingRatePoolExemptOrganization"), - - AGENCY_WITHHOLDING_RATE_POOL_GENERAL("AgencyWithholdingRatePoolGeneral"), - - AGENCY_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION("AgencyWithholdingRatePoolExemptOrganization"), - - US_WITHHOLDING_AGENT_FOREIGN_BRANCH_OF_FI("USWithholdingAgentForeignBranchOfFI"), - - QUALIFIED_DERIVATIVES_DEALER("QualifiedDerivativesDealer"), - - FOREIGN_GOVERNMENT_INTEGRAL_PART("ForeignGovernmentIntegralPart"), - - FOREIGN_GOVERNMENT_CONTROLLED_ENTITY("ForeignGovernmentControlledEntity"), - - PUBLICLY_TRADED_PARTNERSHIP("PubliclyTradedPartnership"), - - DISCLOSING_QUALIFIED_INTERMEDIARY("DisclosingQualifiedIntermediary"); - - private String value; - - Chap3StatusCodeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static Chap3StatusCodeEnum fromValue(String value) { - for (Chap3StatusCodeEnum b : Chap3StatusCodeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final Chap3StatusCodeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public Chap3StatusCodeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return Chap3StatusCodeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - Chap3StatusCodeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_CHAP3_STATUS_CODE = "chap3StatusCode"; - @SerializedName(SERIALIZED_NAME_CHAP3_STATUS_CODE) - private Chap3StatusCodeEnum chap3StatusCode; - - /** - * Chapter 4 status code - */ - @JsonAdapter(Chap4StatusCodeEnum.Adapter.class) - public enum Chap4StatusCodeEnum { - US_WITHHOLDING_AGENT_FI("UsWithholdingAgentFi"), - - US_WITHHOLDING_AGENT_OTHER("UsWithholdingAgentOther"), - - TERRITORY_FI_NOT_TREATED_AS_US_PERSON("TerritoryFiNotTreatedAsUsPerson"), - - TERRITORY_FI_TREATED_AS_US_PERSON("TerritoryFiTreatedAsUsPerson"), - - PARTICIPATING_FFI_OTHER("ParticipatingFfiOther"), - - PARTICIPATING_FFI_REPORTING_MODEL2_FFI("ParticipatingFfiReportingModel2Ffi"), - - REGISTERED_DEEMED_COMPLIANT_FFI_REPORTING_MODEL1_FFI("RegisteredDeemedCompliantFfiReportingModel1Ffi"), - - REGISTERED_DEEMED_COMPLIANT_FFI_SPONSORED_ENTITY("RegisteredDeemedCompliantFfiSponsoredEntity"), - - REGISTERED_DEEMED_COMPLIANT_FFI_OTHER("RegisteredDeemedCompliantFfiOther"), - - CERTIFIED_DEEMED_COMPLIANT_FFI_OTHER("CertifiedDeemedCompliantFfiOther"), - - CERTIFIED_DEEMED_COMPLIANT_FFIFFI_WITH_LOW_VALUE_ACCOUNTS("CertifiedDeemedCompliantFfiffiWithLowValueAccounts"), - - CERTIFIED_DEEMED_COMPLIANT_FFI_NON_REGISTERING_LOCAL_BANK("CertifiedDeemedCompliantFfiNonRegisteringLocalBank"), - - CERTIFIED_DEEMED_COMPLIANT_FFI_SPONSORED_ENTITY("CertifiedDeemedCompliantFfiSponsoredEntity"), - - CERTIFIED_DEEMED_COMPLIANT_FFI_INVESTMENT_ADVISOR_OR_MANAGER("CertifiedDeemedCompliantFfiInvestmentAdvisorOrManager"), - - NONPARTICIPATING_FFI("NonparticipatingFfi"), - - OWNER_DOCUMENTED_FFI("OwnerDocumentedFfi"), - - US_BRANCH_TREATED_AS_US_PERSON("UsBranchTreatedAsUsPerson"), - - US_BRANCH_NOT_TREATED_AS_US_PERSON("UsBranchNotTreatedAsUsPerson"), - - PASSIVE_NFFE_IDENTIFYING_SUBSTANTIAL_US_OWNERS("PassiveNffeIdentifyingSubstantialUsOwners"), - - PASSIVE_NFFE_WITH_NO_SUBSTANTIAL_US_OWNERS("PassiveNffeWithNoSubstantialUsOwners"), - - PUBLICLY_TRADED_NFFE_OR_AFFILIATE("PubliclyTradedNffeOrAffiliate"), - - ACTIVE_NFFE("ActiveNffe"), - - INDIVIDUAL("Individual"), - - SECTION501_C_ENTITIES("Section501CEntities"), - - EXCEPTED_TERRITORY_NFFE("ExceptedTerritoryNffe"), - - EXCEPTED_NFFE_OTHER("ExceptedNffeOther"), - - EXEMPT_BENEFICIAL_OWNER("ExemptBeneficialOwner"), - - ENTITY_WHOLLY_OWNED_BY_EXEMPT_BENEFICIAL_OWNERS("EntityWhollyOwnedByExemptBeneficialOwners"), - - UNKNOWN_RECIPIENT("UnknownRecipient"), - - RECALCITRANT_ACCOUNT_HOLDER("RecalcitrantAccountHolder"), - - NONREPORTING_IGAFII("NonreportingIgafii"), - - DIRECT_REPORTING_NFFE("DirectReportingNffe"), - - US_REPORTABLE_ACCOUNT("UsReportableAccount"), - - NON_CONSENTING_US_ACCOUNT("NonConsentingUsAccount"), - - SPONSORED_DIRECT_REPORTING_NFFE("SponsoredDirectReportingNffe"), - - EXCEPTED_INTER_AFFILIATE_FFI("ExceptedInterAffiliateFfi"), - - UNDOCUMENTED_PREEXISTING_OBLIGATION("UndocumentedPreexistingObligation"), - - US_BRANCH_ECI_PRESUMPTION_APPLIED("UsBranchEciPresumptionApplied"), - - ACCOUNT_HOLDER_OF_EXCLUDED_FINANCIAL_ACCOUNT("AccountHolderOfExcludedFinancialAccount"), - - PASSIVE_NFFE_REPORTED_BY_FFI("PassiveNffeReportedByFfi"), - - NFFE_SUBJECT_TO1472_WITHHOLDING("NffeSubjectTo1472Withholding"), - - RECALCITRANT_POOL_NO_US_INDICIA("RecalcitrantPoolNoUsIndicia"), - - RECALCITRANT_POOL_US_INDICIA("RecalcitrantPoolUsIndicia"), - - RECALCITRANT_POOL_DORMANT_ACCOUNT("RecalcitrantPoolDormantAccount"), - - RECALCITRANT_POOL_US_PERSONS("RecalcitrantPoolUsPersons"), - - RECALCITRANT_POOL_PASSIVE_NFF_ES("RecalcitrantPoolPassiveNffEs"), - - NONPARTICIPATING_FFI_POOL("NonparticipatingFfiPool"), - - US_PAYEES_POOL("UsPayeesPool"), - - QI_RECALCITRANT_POOL_GENERAL("QiRecalcitrantPoolGeneral"), - - US_WITHHOLDING_AGENT_FOREIGN_BRANCH_OF_FI("UsWithholdingAgentForeignBranchOfFi"); - - private String value; - - Chap4StatusCodeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static Chap4StatusCodeEnum fromValue(String value) { - for (Chap4StatusCodeEnum b : Chap4StatusCodeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final Chap4StatusCodeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public Chap4StatusCodeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return Chap4StatusCodeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - Chap4StatusCodeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_CHAP4_STATUS_CODE = "chap4StatusCode"; - @SerializedName(SERIALIZED_NAME_CHAP4_STATUS_CODE) - private Chap4StatusCodeEnum chap4StatusCode; - - public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT = "primaryWithholdingAgent"; - @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT) - private PrimaryWithholdingAgent primaryWithholdingAgent; - - public static final String SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH = "intermediaryOrFlowThrough"; - @SerializedName(SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH) - private IntermediaryOrFlowThrough intermediaryOrFlowThrough; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1042SListItem() { - } - - public Form1042SListItem uniqueFormId(String uniqueFormId) { - this.uniqueFormId = uniqueFormId; - return this; - } - - /** - * Unique form identifier - * @return uniqueFormId - */ - @javax.annotation.Nullable - public String getUniqueFormId() { - return uniqueFormId; - } - - public void setUniqueFormId(String uniqueFormId) { - this.uniqueFormId = uniqueFormId; - } - - - public Form1042SListItem noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * No TIN indicator - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1042SListItem recipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { - this.recipientDateOfBirth = recipientDateOfBirth; - return this; - } - - /** - * Recipient's date of birth - * @return recipientDateOfBirth - */ - @javax.annotation.Nullable - public OffsetDateTime getRecipientDateOfBirth() { - return recipientDateOfBirth; - } - - public void setRecipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { - this.recipientDateOfBirth = recipientDateOfBirth; - } - - - public Form1042SListItem recipientGiin(String recipientGiin) { - this.recipientGiin = recipientGiin; - return this; - } - - /** - * Recipient's GIIN (Global Intermediary Identification Number) - * @return recipientGiin - */ - @javax.annotation.Nullable - public String getRecipientGiin() { - return recipientGiin; - } - - public void setRecipientGiin(String recipientGiin) { - this.recipientGiin = recipientGiin; - } - - - public Form1042SListItem recipientForeignTin(String recipientForeignTin) { - this.recipientForeignTin = recipientForeignTin; - return this; - } - - /** - * Recipient's foreign TIN - * @return recipientForeignTin - */ - @javax.annotation.Nullable - public String getRecipientForeignTin() { - return recipientForeignTin; - } - - public void setRecipientForeignTin(String recipientForeignTin) { - this.recipientForeignTin = recipientForeignTin; - } - - - public Form1042SListItem lobCode(LobCodeEnum lobCode) { - this.lobCode = lobCode; - return this; - } - - /** - * Limitation on benefits code - * @return lobCode - */ - @javax.annotation.Nullable - public LobCodeEnum getLobCode() { - return lobCode; - } - - public void setLobCode(LobCodeEnum lobCode) { - this.lobCode = lobCode; - } - - - public Form1042SListItem incomeCode(String incomeCode) { - this.incomeCode = incomeCode; - return this; - } - - /** - * Income code - * @return incomeCode - */ - @javax.annotation.Nullable - public String getIncomeCode() { - return incomeCode; - } - - public void setIncomeCode(String incomeCode) { - this.incomeCode = incomeCode; - } - - - public Form1042SListItem grossIncome(Double grossIncome) { - this.grossIncome = grossIncome; - return this; - } - - /** - * Gross income - * @return grossIncome - */ - @javax.annotation.Nullable - public Double getGrossIncome() { - return grossIncome; - } - - public void setGrossIncome(Double grossIncome) { - this.grossIncome = grossIncome; - } - - - public Form1042SListItem withholdingIndicator(String withholdingIndicator) { - this.withholdingIndicator = withholdingIndicator; - return this; - } - - /** - * Withholding indicator - * @return withholdingIndicator - */ - @javax.annotation.Nullable - public String getWithholdingIndicator() { - return withholdingIndicator; - } - - public void setWithholdingIndicator(String withholdingIndicator) { - this.withholdingIndicator = withholdingIndicator; - } - - - public Form1042SListItem taxCountryCode(String taxCountryCode) { - this.taxCountryCode = taxCountryCode; - return this; - } - - /** - * Country code - * @return taxCountryCode - */ - @javax.annotation.Nullable - public String getTaxCountryCode() { - return taxCountryCode; - } - - public void setTaxCountryCode(String taxCountryCode) { - this.taxCountryCode = taxCountryCode; - } - - - public Form1042SListItem exemptionCodeChap3(ExemptionCodeChap3Enum exemptionCodeChap3) { - this.exemptionCodeChap3 = exemptionCodeChap3; - return this; - } - - /** - * Exemption code (Chapter 3) - * @return exemptionCodeChap3 - */ - @javax.annotation.Nullable - public ExemptionCodeChap3Enum getExemptionCodeChap3() { - return exemptionCodeChap3; - } - - public void setExemptionCodeChap3(ExemptionCodeChap3Enum exemptionCodeChap3) { - this.exemptionCodeChap3 = exemptionCodeChap3; - } - - - public Form1042SListItem exemptionCodeChap4(ExemptionCodeChap4Enum exemptionCodeChap4) { - this.exemptionCodeChap4 = exemptionCodeChap4; - return this; - } - - /** - * Exemption code (Chapter 4) - * @return exemptionCodeChap4 - */ - @javax.annotation.Nullable - public ExemptionCodeChap4Enum getExemptionCodeChap4() { - return exemptionCodeChap4; - } - - public void setExemptionCodeChap4(ExemptionCodeChap4Enum exemptionCodeChap4) { - this.exemptionCodeChap4 = exemptionCodeChap4; - } - - - public Form1042SListItem taxRateChap3(String taxRateChap3) { - this.taxRateChap3 = taxRateChap3; - return this; - } - - /** - * Tax rate (Chapter 3) - * @return taxRateChap3 - */ - @javax.annotation.Nullable - public String getTaxRateChap3() { - return taxRateChap3; - } - - public void setTaxRateChap3(String taxRateChap3) { - this.taxRateChap3 = taxRateChap3; - } - - - public Form1042SListItem withholdingAllowance(Double withholdingAllowance) { - this.withholdingAllowance = withholdingAllowance; - return this; - } - - /** - * Withholding allowance - * @return withholdingAllowance - */ - @javax.annotation.Nullable - public Double getWithholdingAllowance() { - return withholdingAllowance; - } - - public void setWithholdingAllowance(Double withholdingAllowance) { - this.withholdingAllowance = withholdingAllowance; - } - - - public Form1042SListItem federalTaxWithheld(Double federalTaxWithheld) { - this.federalTaxWithheld = federalTaxWithheld; - return this; - } - - /** - * Federal tax withheld - * @return federalTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalTaxWithheld() { - return federalTaxWithheld; - } - - public void setFederalTaxWithheld(Double federalTaxWithheld) { - this.federalTaxWithheld = federalTaxWithheld; - } - - - public Form1042SListItem taxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { - this.taxNotDepositedIndicator = taxNotDepositedIndicator; - return this; - } - - /** - * Tax not deposited indicator - * @return taxNotDepositedIndicator - */ - @javax.annotation.Nullable - public Boolean getTaxNotDepositedIndicator() { - return taxNotDepositedIndicator; - } - - public void setTaxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { - this.taxNotDepositedIndicator = taxNotDepositedIndicator; - } - - - public Form1042SListItem academicIndicator(Boolean academicIndicator) { - this.academicIndicator = academicIndicator; - return this; - } - - /** - * Academic indicator - * @return academicIndicator - */ - @javax.annotation.Nullable - public Boolean getAcademicIndicator() { - return academicIndicator; - } - - public void setAcademicIndicator(Boolean academicIndicator) { - this.academicIndicator = academicIndicator; - } - - - public Form1042SListItem taxWithheldOtherAgents(Double taxWithheldOtherAgents) { - this.taxWithheldOtherAgents = taxWithheldOtherAgents; - return this; - } - - /** - * Tax withheld by other agents - * @return taxWithheldOtherAgents - */ - @javax.annotation.Nullable - public Double getTaxWithheldOtherAgents() { - return taxWithheldOtherAgents; - } - - public void setTaxWithheldOtherAgents(Double taxWithheldOtherAgents) { - this.taxWithheldOtherAgents = taxWithheldOtherAgents; - } - - - public Form1042SListItem amountRepaid(Double amountRepaid) { - this.amountRepaid = amountRepaid; - return this; - } - - /** - * Amount repaid to recipient - * @return amountRepaid - */ - @javax.annotation.Nullable - public Double getAmountRepaid() { - return amountRepaid; - } - - public void setAmountRepaid(Double amountRepaid) { - this.amountRepaid = amountRepaid; - } - - - public Form1042SListItem taxPaidAgent(Double taxPaidAgent) { - this.taxPaidAgent = taxPaidAgent; - return this; - } - - /** - * Tax paid by withholding agent - * @return taxPaidAgent - */ - @javax.annotation.Nullable - public Double getTaxPaidAgent() { - return taxPaidAgent; - } - - public void setTaxPaidAgent(Double taxPaidAgent) { - this.taxPaidAgent = taxPaidAgent; - } - - - public Form1042SListItem chap3StatusCode(Chap3StatusCodeEnum chap3StatusCode) { - this.chap3StatusCode = chap3StatusCode; - return this; - } - - /** - * Chapter 3 status code - * @return chap3StatusCode - */ - @javax.annotation.Nullable - public Chap3StatusCodeEnum getChap3StatusCode() { - return chap3StatusCode; - } - - public void setChap3StatusCode(Chap3StatusCodeEnum chap3StatusCode) { - this.chap3StatusCode = chap3StatusCode; - } - - - public Form1042SListItem chap4StatusCode(Chap4StatusCodeEnum chap4StatusCode) { - this.chap4StatusCode = chap4StatusCode; - return this; - } - - /** - * Chapter 4 status code - * @return chap4StatusCode - */ - @javax.annotation.Nullable - public Chap4StatusCodeEnum getChap4StatusCode() { - return chap4StatusCode; - } - - public void setChap4StatusCode(Chap4StatusCodeEnum chap4StatusCode) { - this.chap4StatusCode = chap4StatusCode; - } - - - public Form1042SListItem primaryWithholdingAgent(PrimaryWithholdingAgent primaryWithholdingAgent) { - this.primaryWithholdingAgent = primaryWithholdingAgent; - return this; - } - - /** - * Primary withholding agent information - * @return primaryWithholdingAgent - */ - @javax.annotation.Nullable - public PrimaryWithholdingAgent getPrimaryWithholdingAgent() { - return primaryWithholdingAgent; - } - - public void setPrimaryWithholdingAgent(PrimaryWithholdingAgent primaryWithholdingAgent) { - this.primaryWithholdingAgent = primaryWithholdingAgent; - } - - - public Form1042SListItem intermediaryOrFlowThrough(IntermediaryOrFlowThrough intermediaryOrFlowThrough) { - this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; - return this; - } - - /** - * Intermediary or flow-through entity information - * @return intermediaryOrFlowThrough - */ - @javax.annotation.Nullable - public IntermediaryOrFlowThrough getIntermediaryOrFlowThrough() { - return intermediaryOrFlowThrough; - } - - public void setIntermediaryOrFlowThrough(IntermediaryOrFlowThrough intermediaryOrFlowThrough) { - this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; - } - - - public Form1042SListItem issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1042SListItem referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1042SListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1042SListItem recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1042SListItem tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1042SListItem recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1042SListItem address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1042SListItem address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1042SListItem city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1042SListItem state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1042SListItem zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1042SListItem email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1042SListItem accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1042SListItem officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1042SListItem nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1042SListItem countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1042SListItem federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1042SListItem postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1042SListItem stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1042SListItem tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1042SListItem secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1042SListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1042SListItem addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1042SListItem stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1042SListItem form1042SListItem = (Form1042SListItem) o; - return Objects.equals(this.uniqueFormId, form1042SListItem.uniqueFormId) && - Objects.equals(this.noTin, form1042SListItem.noTin) && - Objects.equals(this.recipientDateOfBirth, form1042SListItem.recipientDateOfBirth) && - Objects.equals(this.recipientGiin, form1042SListItem.recipientGiin) && - Objects.equals(this.recipientForeignTin, form1042SListItem.recipientForeignTin) && - Objects.equals(this.lobCode, form1042SListItem.lobCode) && - Objects.equals(this.incomeCode, form1042SListItem.incomeCode) && - Objects.equals(this.grossIncome, form1042SListItem.grossIncome) && - Objects.equals(this.withholdingIndicator, form1042SListItem.withholdingIndicator) && - Objects.equals(this.taxCountryCode, form1042SListItem.taxCountryCode) && - Objects.equals(this.exemptionCodeChap3, form1042SListItem.exemptionCodeChap3) && - Objects.equals(this.exemptionCodeChap4, form1042SListItem.exemptionCodeChap4) && - Objects.equals(this.taxRateChap3, form1042SListItem.taxRateChap3) && - Objects.equals(this.withholdingAllowance, form1042SListItem.withholdingAllowance) && - Objects.equals(this.federalTaxWithheld, form1042SListItem.federalTaxWithheld) && - Objects.equals(this.taxNotDepositedIndicator, form1042SListItem.taxNotDepositedIndicator) && - Objects.equals(this.academicIndicator, form1042SListItem.academicIndicator) && - Objects.equals(this.taxWithheldOtherAgents, form1042SListItem.taxWithheldOtherAgents) && - Objects.equals(this.amountRepaid, form1042SListItem.amountRepaid) && - Objects.equals(this.taxPaidAgent, form1042SListItem.taxPaidAgent) && - Objects.equals(this.chap3StatusCode, form1042SListItem.chap3StatusCode) && - Objects.equals(this.chap4StatusCode, form1042SListItem.chap4StatusCode) && - Objects.equals(this.primaryWithholdingAgent, form1042SListItem.primaryWithholdingAgent) && - Objects.equals(this.intermediaryOrFlowThrough, form1042SListItem.intermediaryOrFlowThrough) && - Objects.equals(this.issuerId, form1042SListItem.issuerId) && - Objects.equals(this.referenceId, form1042SListItem.referenceId) && - Objects.equals(this.recipientTin, form1042SListItem.recipientTin) && - Objects.equals(this.recipientName, form1042SListItem.recipientName) && - Objects.equals(this.tinType, form1042SListItem.tinType) && - Objects.equals(this.recipientSecondName, form1042SListItem.recipientSecondName) && - Objects.equals(this.address, form1042SListItem.address) && - Objects.equals(this.address2, form1042SListItem.address2) && - Objects.equals(this.city, form1042SListItem.city) && - Objects.equals(this.state, form1042SListItem.state) && - Objects.equals(this.zip, form1042SListItem.zip) && - Objects.equals(this.email, form1042SListItem.email) && - Objects.equals(this.accountNumber, form1042SListItem.accountNumber) && - Objects.equals(this.officeCode, form1042SListItem.officeCode) && - Objects.equals(this.nonUsProvince, form1042SListItem.nonUsProvince) && - Objects.equals(this.countryCode, form1042SListItem.countryCode) && - Objects.equals(this.federalEFile, form1042SListItem.federalEFile) && - Objects.equals(this.postalMail, form1042SListItem.postalMail) && - Objects.equals(this.stateEFile, form1042SListItem.stateEFile) && - Objects.equals(this.tinMatch, form1042SListItem.tinMatch) && - Objects.equals(this.secondTinNotice, form1042SListItem.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, form1042SListItem.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, form1042SListItem.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1042SListItem.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(uniqueFormId, noTin, recipientDateOfBirth, recipientGiin, recipientForeignTin, lobCode, incomeCode, grossIncome, withholdingIndicator, taxCountryCode, exemptionCodeChap3, exemptionCodeChap4, taxRateChap3, withholdingAllowance, federalTaxWithheld, taxNotDepositedIndicator, academicIndicator, taxWithheldOtherAgents, amountRepaid, taxPaidAgent, chap3StatusCode, chap4StatusCode, primaryWithholdingAgent, intermediaryOrFlowThrough, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1042SListItem {\n"); - sb.append(" uniqueFormId: ").append(toIndentedString(uniqueFormId)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" recipientDateOfBirth: ").append(toIndentedString(recipientDateOfBirth)).append("\n"); - sb.append(" recipientGiin: ").append(toIndentedString(recipientGiin)).append("\n"); - sb.append(" recipientForeignTin: ").append(toIndentedString(recipientForeignTin)).append("\n"); - sb.append(" lobCode: ").append(toIndentedString(lobCode)).append("\n"); - sb.append(" incomeCode: ").append(toIndentedString(incomeCode)).append("\n"); - sb.append(" grossIncome: ").append(toIndentedString(grossIncome)).append("\n"); - sb.append(" withholdingIndicator: ").append(toIndentedString(withholdingIndicator)).append("\n"); - sb.append(" taxCountryCode: ").append(toIndentedString(taxCountryCode)).append("\n"); - sb.append(" exemptionCodeChap3: ").append(toIndentedString(exemptionCodeChap3)).append("\n"); - sb.append(" exemptionCodeChap4: ").append(toIndentedString(exemptionCodeChap4)).append("\n"); - sb.append(" taxRateChap3: ").append(toIndentedString(taxRateChap3)).append("\n"); - sb.append(" withholdingAllowance: ").append(toIndentedString(withholdingAllowance)).append("\n"); - sb.append(" federalTaxWithheld: ").append(toIndentedString(federalTaxWithheld)).append("\n"); - sb.append(" taxNotDepositedIndicator: ").append(toIndentedString(taxNotDepositedIndicator)).append("\n"); - sb.append(" academicIndicator: ").append(toIndentedString(academicIndicator)).append("\n"); - sb.append(" taxWithheldOtherAgents: ").append(toIndentedString(taxWithheldOtherAgents)).append("\n"); - sb.append(" amountRepaid: ").append(toIndentedString(amountRepaid)).append("\n"); - sb.append(" taxPaidAgent: ").append(toIndentedString(taxPaidAgent)).append("\n"); - sb.append(" chap3StatusCode: ").append(toIndentedString(chap3StatusCode)).append("\n"); - sb.append(" chap4StatusCode: ").append(toIndentedString(chap4StatusCode)).append("\n"); - sb.append(" primaryWithholdingAgent: ").append(toIndentedString(primaryWithholdingAgent)).append("\n"); - sb.append(" intermediaryOrFlowThrough: ").append(toIndentedString(intermediaryOrFlowThrough)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1042SListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1042SListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1042SListItem is not found in the empty JSON string", Form1042SListItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1042SListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042SListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("uniqueFormId") != null && !jsonObj.get("uniqueFormId").isJsonNull()) && !jsonObj.get("uniqueFormId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `uniqueFormId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uniqueFormId").toString())); - } - if ((jsonObj.get("recipientGiin") != null && !jsonObj.get("recipientGiin").isJsonNull()) && !jsonObj.get("recipientGiin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientGiin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientGiin").toString())); - } - if ((jsonObj.get("recipientForeignTin") != null && !jsonObj.get("recipientForeignTin").isJsonNull()) && !jsonObj.get("recipientForeignTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientForeignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientForeignTin").toString())); - } - if ((jsonObj.get("lobCode") != null && !jsonObj.get("lobCode").isJsonNull()) && !jsonObj.get("lobCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lobCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lobCode").toString())); - } - // validate the optional field `lobCode` - if (jsonObj.get("lobCode") != null && !jsonObj.get("lobCode").isJsonNull()) { - LobCodeEnum.validateJsonElement(jsonObj.get("lobCode")); - } - if ((jsonObj.get("incomeCode") != null && !jsonObj.get("incomeCode").isJsonNull()) && !jsonObj.get("incomeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `incomeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("incomeCode").toString())); - } - if ((jsonObj.get("withholdingIndicator") != null && !jsonObj.get("withholdingIndicator").isJsonNull()) && !jsonObj.get("withholdingIndicator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `withholdingIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("withholdingIndicator").toString())); - } - if ((jsonObj.get("taxCountryCode") != null && !jsonObj.get("taxCountryCode").isJsonNull()) && !jsonObj.get("taxCountryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxCountryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxCountryCode").toString())); - } - if ((jsonObj.get("exemptionCodeChap3") != null && !jsonObj.get("exemptionCodeChap3").isJsonNull()) && !jsonObj.get("exemptionCodeChap3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exemptionCodeChap3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptionCodeChap3").toString())); - } - // validate the optional field `exemptionCodeChap3` - if (jsonObj.get("exemptionCodeChap3") != null && !jsonObj.get("exemptionCodeChap3").isJsonNull()) { - ExemptionCodeChap3Enum.validateJsonElement(jsonObj.get("exemptionCodeChap3")); - } - if ((jsonObj.get("exemptionCodeChap4") != null && !jsonObj.get("exemptionCodeChap4").isJsonNull()) && !jsonObj.get("exemptionCodeChap4").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exemptionCodeChap4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptionCodeChap4").toString())); - } - // validate the optional field `exemptionCodeChap4` - if (jsonObj.get("exemptionCodeChap4") != null && !jsonObj.get("exemptionCodeChap4").isJsonNull()) { - ExemptionCodeChap4Enum.validateJsonElement(jsonObj.get("exemptionCodeChap4")); - } - if ((jsonObj.get("taxRateChap3") != null && !jsonObj.get("taxRateChap3").isJsonNull()) && !jsonObj.get("taxRateChap3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxRateChap3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxRateChap3").toString())); - } - if ((jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) && !jsonObj.get("chap3StatusCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chap3StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap3StatusCode").toString())); - } - // validate the optional field `chap3StatusCode` - if (jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) { - Chap3StatusCodeEnum.validateJsonElement(jsonObj.get("chap3StatusCode")); - } - if ((jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) && !jsonObj.get("chap4StatusCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chap4StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap4StatusCode").toString())); - } - // validate the optional field `chap4StatusCode` - if (jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) { - Chap4StatusCodeEnum.validateJsonElement(jsonObj.get("chap4StatusCode")); - } - // validate the optional field `primaryWithholdingAgent` - if (jsonObj.get("primaryWithholdingAgent") != null && !jsonObj.get("primaryWithholdingAgent").isJsonNull()) { - PrimaryWithholdingAgent.validateJsonElement(jsonObj.get("primaryWithholdingAgent")); - } - // validate the optional field `intermediaryOrFlowThrough` - if (jsonObj.get("intermediaryOrFlowThrough") != null && !jsonObj.get("intermediaryOrFlowThrough").isJsonNull()) { - IntermediaryOrFlowThrough.validateJsonElement(jsonObj.get("intermediaryOrFlowThrough")); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1042SListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1042SListItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1042SListItem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1042SListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1042SListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1042SListItem - * @throws IOException if the JSON string is invalid with respect to Form1042SListItem - */ - public static Form1042SListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1042SListItem.class); - } - - /** - * Convert an instance of Form1042SListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItemResponse.java deleted file mode 100644 index fecdaa9..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItemResponse.java +++ /dev/null @@ -1,1906 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughResponse; -import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentResponse; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1042SListItemResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1042SListItemResponse { - public static final String SERIALIZED_NAME_UNIQUE_FORM_ID = "uniqueFormId"; - @SerializedName(SERIALIZED_NAME_UNIQUE_FORM_ID) - private String uniqueFormId; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH = "recipientDateOfBirth"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH) - private OffsetDateTime recipientDateOfBirth; - - public static final String SERIALIZED_NAME_RECIPIENT_GIIN = "recipientGiin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_GIIN) - private String recipientGiin; - - public static final String SERIALIZED_NAME_RECIPIENT_FOREIGN_TIN = "recipientForeignTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_FOREIGN_TIN) - private String recipientForeignTin; - - public static final String SERIALIZED_NAME_LOB_CODE = "lobCode"; - @SerializedName(SERIALIZED_NAME_LOB_CODE) - private String lobCode; - - public static final String SERIALIZED_NAME_INCOME_CODE = "incomeCode"; - @SerializedName(SERIALIZED_NAME_INCOME_CODE) - private String incomeCode; - - public static final String SERIALIZED_NAME_GROSS_INCOME = "grossIncome"; - @SerializedName(SERIALIZED_NAME_GROSS_INCOME) - private Double grossIncome; - - public static final String SERIALIZED_NAME_WITHHOLDING_INDICATOR = "withholdingIndicator"; - @SerializedName(SERIALIZED_NAME_WITHHOLDING_INDICATOR) - private String withholdingIndicator; - - public static final String SERIALIZED_NAME_TAX_COUNTRY_CODE = "taxCountryCode"; - @SerializedName(SERIALIZED_NAME_TAX_COUNTRY_CODE) - private String taxCountryCode; - - public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP3 = "exemptionCodeChap3"; - @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP3) - private String exemptionCodeChap3; - - public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP4 = "exemptionCodeChap4"; - @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP4) - private String exemptionCodeChap4; - - public static final String SERIALIZED_NAME_TAX_RATE_CHAP3 = "taxRateChap3"; - @SerializedName(SERIALIZED_NAME_TAX_RATE_CHAP3) - private String taxRateChap3; - - public static final String SERIALIZED_NAME_WITHHOLDING_ALLOWANCE = "withholdingAllowance"; - @SerializedName(SERIALIZED_NAME_WITHHOLDING_ALLOWANCE) - private Double withholdingAllowance; - - public static final String SERIALIZED_NAME_FEDERAL_TAX_WITHHELD = "federalTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_TAX_WITHHELD) - private Double federalTaxWithheld; - - public static final String SERIALIZED_NAME_TAX_NOT_DEPOSITED_INDICATOR = "taxNotDepositedIndicator"; - @SerializedName(SERIALIZED_NAME_TAX_NOT_DEPOSITED_INDICATOR) - private Boolean taxNotDepositedIndicator; - - public static final String SERIALIZED_NAME_ACADEMIC_INDICATOR = "academicIndicator"; - @SerializedName(SERIALIZED_NAME_ACADEMIC_INDICATOR) - private Boolean academicIndicator; - - public static final String SERIALIZED_NAME_TAX_WITHHELD_OTHER_AGENTS = "taxWithheldOtherAgents"; - @SerializedName(SERIALIZED_NAME_TAX_WITHHELD_OTHER_AGENTS) - private Double taxWithheldOtherAgents; - - public static final String SERIALIZED_NAME_AMOUNT_REPAID = "amountRepaid"; - @SerializedName(SERIALIZED_NAME_AMOUNT_REPAID) - private Double amountRepaid; - - public static final String SERIALIZED_NAME_TAX_PAID_AGENT = "taxPaidAgent"; - @SerializedName(SERIALIZED_NAME_TAX_PAID_AGENT) - private Double taxPaidAgent; - - public static final String SERIALIZED_NAME_CHAP3_STATUS_CODE = "chap3StatusCode"; - @SerializedName(SERIALIZED_NAME_CHAP3_STATUS_CODE) - private String chap3StatusCode; - - public static final String SERIALIZED_NAME_CHAP4_STATUS_CODE = "chap4StatusCode"; - @SerializedName(SERIALIZED_NAME_CHAP4_STATUS_CODE) - private String chap4StatusCode; - - public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT = "primaryWithholdingAgent"; - @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT) - private PrimaryWithholdingAgentResponse primaryWithholdingAgent; - - public static final String SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH = "intermediaryOrFlowThrough"; - @SerializedName(SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH) - private IntermediaryOrFlowThroughResponse intermediaryOrFlowThrough; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - public Form1042SListItemResponse() { - } - - public Form1042SListItemResponse( - String id, - StatusDetail federalEfileStatus, - List stateEfileStatus, - StatusDetail postalMailStatus, - StatusDetail tinMatchStatus, - StatusDetail addressVerificationStatus, - StatusDetail eDeliveryStatus, - List validationErrors, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.id = id; - this.federalEfileStatus = federalEfileStatus; - this.stateEfileStatus = stateEfileStatus; - this.postalMailStatus = postalMailStatus; - this.tinMatchStatus = tinMatchStatus; - this.addressVerificationStatus = addressVerificationStatus; - this.eDeliveryStatus = eDeliveryStatus; - this.validationErrors = validationErrors; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - public Form1042SListItemResponse uniqueFormId(String uniqueFormId) { - this.uniqueFormId = uniqueFormId; - return this; - } - - /** - * Unique form identifier - * @return uniqueFormId - */ - @javax.annotation.Nullable - public String getUniqueFormId() { - return uniqueFormId; - } - - public void setUniqueFormId(String uniqueFormId) { - this.uniqueFormId = uniqueFormId; - } - - - public Form1042SListItemResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * No TIN indicator - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1042SListItemResponse recipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { - this.recipientDateOfBirth = recipientDateOfBirth; - return this; - } - - /** - * Recipient's date of birth - * @return recipientDateOfBirth - */ - @javax.annotation.Nullable - public OffsetDateTime getRecipientDateOfBirth() { - return recipientDateOfBirth; - } - - public void setRecipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { - this.recipientDateOfBirth = recipientDateOfBirth; - } - - - public Form1042SListItemResponse recipientGiin(String recipientGiin) { - this.recipientGiin = recipientGiin; - return this; - } - - /** - * Recipient's GIIN (Global Intermediary Identification Number) - * @return recipientGiin - */ - @javax.annotation.Nullable - public String getRecipientGiin() { - return recipientGiin; - } - - public void setRecipientGiin(String recipientGiin) { - this.recipientGiin = recipientGiin; - } - - - public Form1042SListItemResponse recipientForeignTin(String recipientForeignTin) { - this.recipientForeignTin = recipientForeignTin; - return this; - } - - /** - * Recipient's foreign TIN - * @return recipientForeignTin - */ - @javax.annotation.Nullable - public String getRecipientForeignTin() { - return recipientForeignTin; - } - - public void setRecipientForeignTin(String recipientForeignTin) { - this.recipientForeignTin = recipientForeignTin; - } - - - public Form1042SListItemResponse lobCode(String lobCode) { - this.lobCode = lobCode; - return this; - } - - /** - * Limitation on benefits code - * @return lobCode - */ - @javax.annotation.Nullable - public String getLobCode() { - return lobCode; - } - - public void setLobCode(String lobCode) { - this.lobCode = lobCode; - } - - - public Form1042SListItemResponse incomeCode(String incomeCode) { - this.incomeCode = incomeCode; - return this; - } - - /** - * Income code - * @return incomeCode - */ - @javax.annotation.Nullable - public String getIncomeCode() { - return incomeCode; - } - - public void setIncomeCode(String incomeCode) { - this.incomeCode = incomeCode; - } - - - public Form1042SListItemResponse grossIncome(Double grossIncome) { - this.grossIncome = grossIncome; - return this; - } - - /** - * Gross income - * @return grossIncome - */ - @javax.annotation.Nullable - public Double getGrossIncome() { - return grossIncome; - } - - public void setGrossIncome(Double grossIncome) { - this.grossIncome = grossIncome; - } - - - public Form1042SListItemResponse withholdingIndicator(String withholdingIndicator) { - this.withholdingIndicator = withholdingIndicator; - return this; - } - - /** - * Withholding indicator - * @return withholdingIndicator - */ - @javax.annotation.Nullable - public String getWithholdingIndicator() { - return withholdingIndicator; - } - - public void setWithholdingIndicator(String withholdingIndicator) { - this.withholdingIndicator = withholdingIndicator; - } - - - public Form1042SListItemResponse taxCountryCode(String taxCountryCode) { - this.taxCountryCode = taxCountryCode; - return this; - } - - /** - * Country code - * @return taxCountryCode - */ - @javax.annotation.Nullable - public String getTaxCountryCode() { - return taxCountryCode; - } - - public void setTaxCountryCode(String taxCountryCode) { - this.taxCountryCode = taxCountryCode; - } - - - public Form1042SListItemResponse exemptionCodeChap3(String exemptionCodeChap3) { - this.exemptionCodeChap3 = exemptionCodeChap3; - return this; - } - - /** - * Exemption code (Chapter 3) - * @return exemptionCodeChap3 - */ - @javax.annotation.Nullable - public String getExemptionCodeChap3() { - return exemptionCodeChap3; - } - - public void setExemptionCodeChap3(String exemptionCodeChap3) { - this.exemptionCodeChap3 = exemptionCodeChap3; - } - - - public Form1042SListItemResponse exemptionCodeChap4(String exemptionCodeChap4) { - this.exemptionCodeChap4 = exemptionCodeChap4; - return this; - } - - /** - * Exemption code (Chapter 4) - * @return exemptionCodeChap4 - */ - @javax.annotation.Nullable - public String getExemptionCodeChap4() { - return exemptionCodeChap4; - } - - public void setExemptionCodeChap4(String exemptionCodeChap4) { - this.exemptionCodeChap4 = exemptionCodeChap4; - } - - - public Form1042SListItemResponse taxRateChap3(String taxRateChap3) { - this.taxRateChap3 = taxRateChap3; - return this; - } - - /** - * Tax rate (Chapter 3) - * @return taxRateChap3 - */ - @javax.annotation.Nullable - public String getTaxRateChap3() { - return taxRateChap3; - } - - public void setTaxRateChap3(String taxRateChap3) { - this.taxRateChap3 = taxRateChap3; - } - - - public Form1042SListItemResponse withholdingAllowance(Double withholdingAllowance) { - this.withholdingAllowance = withholdingAllowance; - return this; - } - - /** - * Withholding allowance - * @return withholdingAllowance - */ - @javax.annotation.Nullable - public Double getWithholdingAllowance() { - return withholdingAllowance; - } - - public void setWithholdingAllowance(Double withholdingAllowance) { - this.withholdingAllowance = withholdingAllowance; - } - - - public Form1042SListItemResponse federalTaxWithheld(Double federalTaxWithheld) { - this.federalTaxWithheld = federalTaxWithheld; - return this; - } - - /** - * Federal tax withheld - * @return federalTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalTaxWithheld() { - return federalTaxWithheld; - } - - public void setFederalTaxWithheld(Double federalTaxWithheld) { - this.federalTaxWithheld = federalTaxWithheld; - } - - - public Form1042SListItemResponse taxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { - this.taxNotDepositedIndicator = taxNotDepositedIndicator; - return this; - } - - /** - * Tax not deposited indicator - * @return taxNotDepositedIndicator - */ - @javax.annotation.Nullable - public Boolean getTaxNotDepositedIndicator() { - return taxNotDepositedIndicator; - } - - public void setTaxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { - this.taxNotDepositedIndicator = taxNotDepositedIndicator; - } - - - public Form1042SListItemResponse academicIndicator(Boolean academicIndicator) { - this.academicIndicator = academicIndicator; - return this; - } - - /** - * Academic indicator - * @return academicIndicator - */ - @javax.annotation.Nullable - public Boolean getAcademicIndicator() { - return academicIndicator; - } - - public void setAcademicIndicator(Boolean academicIndicator) { - this.academicIndicator = academicIndicator; - } - - - public Form1042SListItemResponse taxWithheldOtherAgents(Double taxWithheldOtherAgents) { - this.taxWithheldOtherAgents = taxWithheldOtherAgents; - return this; - } - - /** - * Tax withheld by other agents - * @return taxWithheldOtherAgents - */ - @javax.annotation.Nullable - public Double getTaxWithheldOtherAgents() { - return taxWithheldOtherAgents; - } - - public void setTaxWithheldOtherAgents(Double taxWithheldOtherAgents) { - this.taxWithheldOtherAgents = taxWithheldOtherAgents; - } - - - public Form1042SListItemResponse amountRepaid(Double amountRepaid) { - this.amountRepaid = amountRepaid; - return this; - } - - /** - * Amount repaid to recipient - * @return amountRepaid - */ - @javax.annotation.Nullable - public Double getAmountRepaid() { - return amountRepaid; - } - - public void setAmountRepaid(Double amountRepaid) { - this.amountRepaid = amountRepaid; - } - - - public Form1042SListItemResponse taxPaidAgent(Double taxPaidAgent) { - this.taxPaidAgent = taxPaidAgent; - return this; - } - - /** - * Tax paid by withholding agent - * @return taxPaidAgent - */ - @javax.annotation.Nullable - public Double getTaxPaidAgent() { - return taxPaidAgent; - } - - public void setTaxPaidAgent(Double taxPaidAgent) { - this.taxPaidAgent = taxPaidAgent; - } - - - public Form1042SListItemResponse chap3StatusCode(String chap3StatusCode) { - this.chap3StatusCode = chap3StatusCode; - return this; - } - - /** - * Chapter 3 status code - * @return chap3StatusCode - */ - @javax.annotation.Nullable - public String getChap3StatusCode() { - return chap3StatusCode; - } - - public void setChap3StatusCode(String chap3StatusCode) { - this.chap3StatusCode = chap3StatusCode; - } - - - public Form1042SListItemResponse chap4StatusCode(String chap4StatusCode) { - this.chap4StatusCode = chap4StatusCode; - return this; - } - - /** - * Chapter 4 status code - * @return chap4StatusCode - */ - @javax.annotation.Nullable - public String getChap4StatusCode() { - return chap4StatusCode; - } - - public void setChap4StatusCode(String chap4StatusCode) { - this.chap4StatusCode = chap4StatusCode; - } - - - public Form1042SListItemResponse primaryWithholdingAgent(PrimaryWithholdingAgentResponse primaryWithholdingAgent) { - this.primaryWithholdingAgent = primaryWithholdingAgent; - return this; - } - - /** - * Primary withholding agent information - * @return primaryWithholdingAgent - */ - @javax.annotation.Nullable - public PrimaryWithholdingAgentResponse getPrimaryWithholdingAgent() { - return primaryWithholdingAgent; - } - - public void setPrimaryWithholdingAgent(PrimaryWithholdingAgentResponse primaryWithholdingAgent) { - this.primaryWithholdingAgent = primaryWithholdingAgent; - } - - - public Form1042SListItemResponse intermediaryOrFlowThrough(IntermediaryOrFlowThroughResponse intermediaryOrFlowThrough) { - this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; - return this; - } - - /** - * Intermediary or flow-through entity information - * @return intermediaryOrFlowThrough - */ - @javax.annotation.Nullable - public IntermediaryOrFlowThroughResponse getIntermediaryOrFlowThrough() { - return intermediaryOrFlowThrough; - } - - public void setIntermediaryOrFlowThrough(IntermediaryOrFlowThroughResponse intermediaryOrFlowThrough) { - this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; - } - - - /** - * ID of the form - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - - public Form1042SListItemResponse type(String type) { - this.type = type; - return this; - } - - /** - * Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public Form1042SListItemResponse issuerId(Integer issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nonnull - public Integer getIssuerId() { - return issuerId; - } - - public void setIssuerId(Integer issuerId) { - this.issuerId = issuerId; - } - - - public Form1042SListItemResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1042SListItemResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1042SListItemResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1042SListItemResponse federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Boolean indicating that federal e-filing has been scheduled for this form - * @return federalEfile - */ - @javax.annotation.Nonnull - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - /** - * Federal e-file status - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - - - public Form1042SListItemResponse stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - return this; - } - - /** - * Boolean indicating that state e-filing has been scheduled for this form - * @return stateEfile - */ - @javax.annotation.Nonnull - public Boolean getStateEfile() { - return stateEfile; - } - - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - } - - - /** - * State e-file status - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - - - public Form1042SListItemResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient has been scheduled for this form - * @return postalMail - */ - @javax.annotation.Nonnull - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - /** - * Postal mail to recipient status - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - - - public Form1042SListItemResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching has been scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nonnull - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - /** - * TIN Match status - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - - - public Form1042SListItemResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification has been scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nonnull - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - /** - * Address verification status - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - - - /** - * EDelivery status - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - - - public Form1042SListItemResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1042SListItemResponse email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1042SListItemResponse tinType(String tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public String getTinType() { - return tinType; - } - - public void setTinType(String tinType) { - this.tinType = tinType; - } - - - public Form1042SListItemResponse tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Recipient Tax ID Number - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public Form1042SListItemResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second Tin Notice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1042SListItemResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1042SListItemResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1042SListItemResponse address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1042SListItemResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1042SListItemResponse city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1042SListItemResponse state(String state) { - this.state = state; - return this; - } - - /** - * US state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1042SListItemResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1042SListItemResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1042SListItemResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1042SListItemResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account Number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1042SListItemResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office Code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1042SListItemResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - /** - * Validation errors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - - - /** - * Creation time - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - /** - * Update time - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - public Form1042SListItemResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1042SListItemResponse form1042SListItemResponse = (Form1042SListItemResponse) o; - return Objects.equals(this.uniqueFormId, form1042SListItemResponse.uniqueFormId) && - Objects.equals(this.noTin, form1042SListItemResponse.noTin) && - Objects.equals(this.recipientDateOfBirth, form1042SListItemResponse.recipientDateOfBirth) && - Objects.equals(this.recipientGiin, form1042SListItemResponse.recipientGiin) && - Objects.equals(this.recipientForeignTin, form1042SListItemResponse.recipientForeignTin) && - Objects.equals(this.lobCode, form1042SListItemResponse.lobCode) && - Objects.equals(this.incomeCode, form1042SListItemResponse.incomeCode) && - Objects.equals(this.grossIncome, form1042SListItemResponse.grossIncome) && - Objects.equals(this.withholdingIndicator, form1042SListItemResponse.withholdingIndicator) && - Objects.equals(this.taxCountryCode, form1042SListItemResponse.taxCountryCode) && - Objects.equals(this.exemptionCodeChap3, form1042SListItemResponse.exemptionCodeChap3) && - Objects.equals(this.exemptionCodeChap4, form1042SListItemResponse.exemptionCodeChap4) && - Objects.equals(this.taxRateChap3, form1042SListItemResponse.taxRateChap3) && - Objects.equals(this.withholdingAllowance, form1042SListItemResponse.withholdingAllowance) && - Objects.equals(this.federalTaxWithheld, form1042SListItemResponse.federalTaxWithheld) && - Objects.equals(this.taxNotDepositedIndicator, form1042SListItemResponse.taxNotDepositedIndicator) && - Objects.equals(this.academicIndicator, form1042SListItemResponse.academicIndicator) && - Objects.equals(this.taxWithheldOtherAgents, form1042SListItemResponse.taxWithheldOtherAgents) && - Objects.equals(this.amountRepaid, form1042SListItemResponse.amountRepaid) && - Objects.equals(this.taxPaidAgent, form1042SListItemResponse.taxPaidAgent) && - Objects.equals(this.chap3StatusCode, form1042SListItemResponse.chap3StatusCode) && - Objects.equals(this.chap4StatusCode, form1042SListItemResponse.chap4StatusCode) && - Objects.equals(this.primaryWithholdingAgent, form1042SListItemResponse.primaryWithholdingAgent) && - Objects.equals(this.intermediaryOrFlowThrough, form1042SListItemResponse.intermediaryOrFlowThrough) && - Objects.equals(this.id, form1042SListItemResponse.id) && - Objects.equals(this.type, form1042SListItemResponse.type) && - Objects.equals(this.issuerId, form1042SListItemResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1042SListItemResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1042SListItemResponse.issuerTin) && - Objects.equals(this.taxYear, form1042SListItemResponse.taxYear) && - Objects.equals(this.federalEfile, form1042SListItemResponse.federalEfile) && - Objects.equals(this.federalEfileStatus, form1042SListItemResponse.federalEfileStatus) && - Objects.equals(this.stateEfile, form1042SListItemResponse.stateEfile) && - Objects.equals(this.stateEfileStatus, form1042SListItemResponse.stateEfileStatus) && - Objects.equals(this.postalMail, form1042SListItemResponse.postalMail) && - Objects.equals(this.postalMailStatus, form1042SListItemResponse.postalMailStatus) && - Objects.equals(this.tinMatch, form1042SListItemResponse.tinMatch) && - Objects.equals(this.tinMatchStatus, form1042SListItemResponse.tinMatchStatus) && - Objects.equals(this.addressVerification, form1042SListItemResponse.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1042SListItemResponse.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1042SListItemResponse.eDeliveryStatus) && - Objects.equals(this.referenceId, form1042SListItemResponse.referenceId) && - Objects.equals(this.email, form1042SListItemResponse.email) && - Objects.equals(this.tinType, form1042SListItemResponse.tinType) && - Objects.equals(this.tin, form1042SListItemResponse.tin) && - Objects.equals(this.secondTinNotice, form1042SListItemResponse.secondTinNotice) && - Objects.equals(this.recipientName, form1042SListItemResponse.recipientName) && - Objects.equals(this.recipientSecondName, form1042SListItemResponse.recipientSecondName) && - Objects.equals(this.address, form1042SListItemResponse.address) && - Objects.equals(this.address2, form1042SListItemResponse.address2) && - Objects.equals(this.city, form1042SListItemResponse.city) && - Objects.equals(this.state, form1042SListItemResponse.state) && - Objects.equals(this.zip, form1042SListItemResponse.zip) && - Objects.equals(this.nonUsProvince, form1042SListItemResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1042SListItemResponse.countryCode) && - Objects.equals(this.accountNumber, form1042SListItemResponse.accountNumber) && - Objects.equals(this.officeCode, form1042SListItemResponse.officeCode) && - Objects.equals(this.fatcaFilingRequirement, form1042SListItemResponse.fatcaFilingRequirement) && - Objects.equals(this.validationErrors, form1042SListItemResponse.validationErrors) && - Objects.equals(this.createdAt, form1042SListItemResponse.createdAt) && - Objects.equals(this.updatedAt, form1042SListItemResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1042SListItemResponse.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(uniqueFormId, noTin, recipientDateOfBirth, recipientGiin, recipientForeignTin, lobCode, incomeCode, grossIncome, withholdingIndicator, taxCountryCode, exemptionCodeChap3, exemptionCodeChap4, taxRateChap3, withholdingAllowance, federalTaxWithheld, taxNotDepositedIndicator, academicIndicator, taxWithheldOtherAgents, amountRepaid, taxPaidAgent, chap3StatusCode, chap4StatusCode, primaryWithholdingAgent, intermediaryOrFlowThrough, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, fatcaFilingRequirement, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1042SListItemResponse {\n"); - sb.append(" uniqueFormId: ").append(toIndentedString(uniqueFormId)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" recipientDateOfBirth: ").append(toIndentedString(recipientDateOfBirth)).append("\n"); - sb.append(" recipientGiin: ").append(toIndentedString(recipientGiin)).append("\n"); - sb.append(" recipientForeignTin: ").append(toIndentedString(recipientForeignTin)).append("\n"); - sb.append(" lobCode: ").append(toIndentedString(lobCode)).append("\n"); - sb.append(" incomeCode: ").append(toIndentedString(incomeCode)).append("\n"); - sb.append(" grossIncome: ").append(toIndentedString(grossIncome)).append("\n"); - sb.append(" withholdingIndicator: ").append(toIndentedString(withholdingIndicator)).append("\n"); - sb.append(" taxCountryCode: ").append(toIndentedString(taxCountryCode)).append("\n"); - sb.append(" exemptionCodeChap3: ").append(toIndentedString(exemptionCodeChap3)).append("\n"); - sb.append(" exemptionCodeChap4: ").append(toIndentedString(exemptionCodeChap4)).append("\n"); - sb.append(" taxRateChap3: ").append(toIndentedString(taxRateChap3)).append("\n"); - sb.append(" withholdingAllowance: ").append(toIndentedString(withholdingAllowance)).append("\n"); - sb.append(" federalTaxWithheld: ").append(toIndentedString(federalTaxWithheld)).append("\n"); - sb.append(" taxNotDepositedIndicator: ").append(toIndentedString(taxNotDepositedIndicator)).append("\n"); - sb.append(" academicIndicator: ").append(toIndentedString(academicIndicator)).append("\n"); - sb.append(" taxWithheldOtherAgents: ").append(toIndentedString(taxWithheldOtherAgents)).append("\n"); - sb.append(" amountRepaid: ").append(toIndentedString(amountRepaid)).append("\n"); - sb.append(" taxPaidAgent: ").append(toIndentedString(taxPaidAgent)).append("\n"); - sb.append(" chap3StatusCode: ").append(toIndentedString(chap3StatusCode)).append("\n"); - sb.append(" chap4StatusCode: ").append(toIndentedString(chap4StatusCode)).append("\n"); - sb.append(" primaryWithholdingAgent: ").append(toIndentedString(primaryWithholdingAgent)).append("\n"); - sb.append(" intermediaryOrFlowThrough: ").append(toIndentedString(intermediaryOrFlowThrough)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("recipientName"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("validationErrors"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("issuerId"); - openapiRequiredFields.add("federalEfile"); - openapiRequiredFields.add("stateEfile"); - openapiRequiredFields.add("postalMail"); - openapiRequiredFields.add("tinMatch"); - openapiRequiredFields.add("addressVerification"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1042SListItemResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1042SListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1042SListItemResponse is not found in the empty JSON string", Form1042SListItemResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1042SListItemResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042SListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1042SListItemResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("uniqueFormId") != null && !jsonObj.get("uniqueFormId").isJsonNull()) && !jsonObj.get("uniqueFormId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `uniqueFormId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uniqueFormId").toString())); - } - if ((jsonObj.get("recipientGiin") != null && !jsonObj.get("recipientGiin").isJsonNull()) && !jsonObj.get("recipientGiin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientGiin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientGiin").toString())); - } - if ((jsonObj.get("recipientForeignTin") != null && !jsonObj.get("recipientForeignTin").isJsonNull()) && !jsonObj.get("recipientForeignTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientForeignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientForeignTin").toString())); - } - if ((jsonObj.get("lobCode") != null && !jsonObj.get("lobCode").isJsonNull()) && !jsonObj.get("lobCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lobCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lobCode").toString())); - } - if ((jsonObj.get("incomeCode") != null && !jsonObj.get("incomeCode").isJsonNull()) && !jsonObj.get("incomeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `incomeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("incomeCode").toString())); - } - if ((jsonObj.get("withholdingIndicator") != null && !jsonObj.get("withholdingIndicator").isJsonNull()) && !jsonObj.get("withholdingIndicator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `withholdingIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("withholdingIndicator").toString())); - } - if ((jsonObj.get("taxCountryCode") != null && !jsonObj.get("taxCountryCode").isJsonNull()) && !jsonObj.get("taxCountryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxCountryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxCountryCode").toString())); - } - if ((jsonObj.get("exemptionCodeChap3") != null && !jsonObj.get("exemptionCodeChap3").isJsonNull()) && !jsonObj.get("exemptionCodeChap3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exemptionCodeChap3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptionCodeChap3").toString())); - } - if ((jsonObj.get("exemptionCodeChap4") != null && !jsonObj.get("exemptionCodeChap4").isJsonNull()) && !jsonObj.get("exemptionCodeChap4").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exemptionCodeChap4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptionCodeChap4").toString())); - } - if ((jsonObj.get("taxRateChap3") != null && !jsonObj.get("taxRateChap3").isJsonNull()) && !jsonObj.get("taxRateChap3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxRateChap3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxRateChap3").toString())); - } - if ((jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) && !jsonObj.get("chap3StatusCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chap3StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap3StatusCode").toString())); - } - if ((jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) && !jsonObj.get("chap4StatusCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chap4StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap4StatusCode").toString())); - } - // validate the optional field `primaryWithholdingAgent` - if (jsonObj.get("primaryWithholdingAgent") != null && !jsonObj.get("primaryWithholdingAgent").isJsonNull()) { - PrimaryWithholdingAgentResponse.validateJsonElement(jsonObj.get("primaryWithholdingAgent")); - } - // validate the optional field `intermediaryOrFlowThrough` - if (jsonObj.get("intermediaryOrFlowThrough") != null && !jsonObj.get("intermediaryOrFlowThrough").isJsonNull()) { - IntermediaryOrFlowThroughResponse.validateJsonElement(jsonObj.get("intermediaryOrFlowThrough")); - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1042SListItemResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1042SListItemResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItemResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1042SListItemResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1042SListItemResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1042SListItemResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1042SListItemResponse - * @throws IOException if the JSON string is invalid with respect to Form1042SListItemResponse - */ - public static Form1042SListItemResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1042SListItemResponse.class); - } - - /** - * Convert an instance of Form1042SListItemResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SRequest.java deleted file mode 100644 index c7fd231..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SRequest.java +++ /dev/null @@ -1,1679 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughRequest; -import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentRequest; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1042SRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1042SRequest { - public static final String SERIALIZED_NAME_UNIQUE_FORM_ID = "uniqueFormId"; - @SerializedName(SERIALIZED_NAME_UNIQUE_FORM_ID) - private String uniqueFormId; - - public static final String SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH = "recipientDateOfBirth"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH) - private OffsetDateTime recipientDateOfBirth; - - public static final String SERIALIZED_NAME_RECIPIENT_GIIN = "recipientGiin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_GIIN) - private String recipientGiin; - - public static final String SERIALIZED_NAME_RECIPIENT_FOREIGN_TIN = "recipientForeignTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_FOREIGN_TIN) - private String recipientForeignTin; - - public static final String SERIALIZED_NAME_LOB_CODE = "lobCode"; - @SerializedName(SERIALIZED_NAME_LOB_CODE) - private String lobCode; - - public static final String SERIALIZED_NAME_INCOME_CODE = "incomeCode"; - @SerializedName(SERIALIZED_NAME_INCOME_CODE) - private String incomeCode; - - public static final String SERIALIZED_NAME_GROSS_INCOME = "grossIncome"; - @SerializedName(SERIALIZED_NAME_GROSS_INCOME) - private Double grossIncome; - - public static final String SERIALIZED_NAME_WITHHOLDING_INDICATOR = "withholdingIndicator"; - @SerializedName(SERIALIZED_NAME_WITHHOLDING_INDICATOR) - private String withholdingIndicator; - - public static final String SERIALIZED_NAME_TAX_COUNTRY_CODE = "taxCountryCode"; - @SerializedName(SERIALIZED_NAME_TAX_COUNTRY_CODE) - private String taxCountryCode; - - public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP3 = "exemptionCodeChap3"; - @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP3) - private String exemptionCodeChap3; - - public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP4 = "exemptionCodeChap4"; - @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP4) - private String exemptionCodeChap4; - - public static final String SERIALIZED_NAME_TAX_RATE_CHAP3 = "taxRateChap3"; - @SerializedName(SERIALIZED_NAME_TAX_RATE_CHAP3) - private String taxRateChap3; - - public static final String SERIALIZED_NAME_WITHHOLDING_ALLOWANCE = "withholdingAllowance"; - @SerializedName(SERIALIZED_NAME_WITHHOLDING_ALLOWANCE) - private Double withholdingAllowance; - - public static final String SERIALIZED_NAME_FEDERAL_TAX_WITHHELD = "federalTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_TAX_WITHHELD) - private Double federalTaxWithheld; - - public static final String SERIALIZED_NAME_TAX_NOT_DEPOSITED_INDICATOR = "taxNotDepositedIndicator"; - @SerializedName(SERIALIZED_NAME_TAX_NOT_DEPOSITED_INDICATOR) - private Boolean taxNotDepositedIndicator; - - public static final String SERIALIZED_NAME_ACADEMIC_INDICATOR = "academicIndicator"; - @SerializedName(SERIALIZED_NAME_ACADEMIC_INDICATOR) - private Boolean academicIndicator; - - public static final String SERIALIZED_NAME_TAX_WITHHELD_OTHER_AGENTS = "taxWithheldOtherAgents"; - @SerializedName(SERIALIZED_NAME_TAX_WITHHELD_OTHER_AGENTS) - private Double taxWithheldOtherAgents; - - public static final String SERIALIZED_NAME_AMOUNT_REPAID = "amountRepaid"; - @SerializedName(SERIALIZED_NAME_AMOUNT_REPAID) - private Double amountRepaid; - - public static final String SERIALIZED_NAME_TAX_PAID_AGENT = "taxPaidAgent"; - @SerializedName(SERIALIZED_NAME_TAX_PAID_AGENT) - private Double taxPaidAgent; - - public static final String SERIALIZED_NAME_CHAP3_STATUS_CODE = "chap3StatusCode"; - @SerializedName(SERIALIZED_NAME_CHAP3_STATUS_CODE) - private String chap3StatusCode; - - public static final String SERIALIZED_NAME_CHAP4_STATUS_CODE = "chap4StatusCode"; - @SerializedName(SERIALIZED_NAME_CHAP4_STATUS_CODE) - private String chap4StatusCode; - - public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT = "primaryWithholdingAgent"; - @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT) - private PrimaryWithholdingAgentRequest primaryWithholdingAgent; - - public static final String SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH = "intermediaryOrFlowThrough"; - @SerializedName(SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH) - private IntermediaryOrFlowThroughRequest intermediaryOrFlowThrough; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public Form1042SRequest() { - } - - public Form1042SRequest uniqueFormId(String uniqueFormId) { - this.uniqueFormId = uniqueFormId; - return this; - } - - /** - * Unique form identifier - * @return uniqueFormId - */ - @javax.annotation.Nullable - public String getUniqueFormId() { - return uniqueFormId; - } - - public void setUniqueFormId(String uniqueFormId) { - this.uniqueFormId = uniqueFormId; - } - - - public Form1042SRequest recipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { - this.recipientDateOfBirth = recipientDateOfBirth; - return this; - } - - /** - * Recipient's date of birth - * @return recipientDateOfBirth - */ - @javax.annotation.Nullable - public OffsetDateTime getRecipientDateOfBirth() { - return recipientDateOfBirth; - } - - public void setRecipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { - this.recipientDateOfBirth = recipientDateOfBirth; - } - - - public Form1042SRequest recipientGiin(String recipientGiin) { - this.recipientGiin = recipientGiin; - return this; - } - - /** - * Recipient's GIIN (Global Intermediary Identification Number) - * @return recipientGiin - */ - @javax.annotation.Nullable - public String getRecipientGiin() { - return recipientGiin; - } - - public void setRecipientGiin(String recipientGiin) { - this.recipientGiin = recipientGiin; - } - - - public Form1042SRequest recipientForeignTin(String recipientForeignTin) { - this.recipientForeignTin = recipientForeignTin; - return this; - } - - /** - * Recipient's foreign TIN - * @return recipientForeignTin - */ - @javax.annotation.Nullable - public String getRecipientForeignTin() { - return recipientForeignTin; - } - - public void setRecipientForeignTin(String recipientForeignTin) { - this.recipientForeignTin = recipientForeignTin; - } - - - public Form1042SRequest lobCode(String lobCode) { - this.lobCode = lobCode; - return this; - } - - /** - * Limitation on benefits code - * @return lobCode - */ - @javax.annotation.Nullable - public String getLobCode() { - return lobCode; - } - - public void setLobCode(String lobCode) { - this.lobCode = lobCode; - } - - - public Form1042SRequest incomeCode(String incomeCode) { - this.incomeCode = incomeCode; - return this; - } - - /** - * Income code - * @return incomeCode - */ - @javax.annotation.Nullable - public String getIncomeCode() { - return incomeCode; - } - - public void setIncomeCode(String incomeCode) { - this.incomeCode = incomeCode; - } - - - public Form1042SRequest grossIncome(Double grossIncome) { - this.grossIncome = grossIncome; - return this; - } - - /** - * Gross income - * @return grossIncome - */ - @javax.annotation.Nullable - public Double getGrossIncome() { - return grossIncome; - } - - public void setGrossIncome(Double grossIncome) { - this.grossIncome = grossIncome; - } - - - public Form1042SRequest withholdingIndicator(String withholdingIndicator) { - this.withholdingIndicator = withholdingIndicator; - return this; - } - - /** - * Withholding indicator - * @return withholdingIndicator - */ - @javax.annotation.Nullable - public String getWithholdingIndicator() { - return withholdingIndicator; - } - - public void setWithholdingIndicator(String withholdingIndicator) { - this.withholdingIndicator = withholdingIndicator; - } - - - public Form1042SRequest taxCountryCode(String taxCountryCode) { - this.taxCountryCode = taxCountryCode; - return this; - } - - /** - * Country code - * @return taxCountryCode - */ - @javax.annotation.Nullable - public String getTaxCountryCode() { - return taxCountryCode; - } - - public void setTaxCountryCode(String taxCountryCode) { - this.taxCountryCode = taxCountryCode; - } - - - public Form1042SRequest exemptionCodeChap3(String exemptionCodeChap3) { - this.exemptionCodeChap3 = exemptionCodeChap3; - return this; - } - - /** - * Exemption code (Chapter 3) - * @return exemptionCodeChap3 - */ - @javax.annotation.Nullable - public String getExemptionCodeChap3() { - return exemptionCodeChap3; - } - - public void setExemptionCodeChap3(String exemptionCodeChap3) { - this.exemptionCodeChap3 = exemptionCodeChap3; - } - - - public Form1042SRequest exemptionCodeChap4(String exemptionCodeChap4) { - this.exemptionCodeChap4 = exemptionCodeChap4; - return this; - } - - /** - * Exemption code (Chapter 4) - * @return exemptionCodeChap4 - */ - @javax.annotation.Nullable - public String getExemptionCodeChap4() { - return exemptionCodeChap4; - } - - public void setExemptionCodeChap4(String exemptionCodeChap4) { - this.exemptionCodeChap4 = exemptionCodeChap4; - } - - - public Form1042SRequest taxRateChap3(String taxRateChap3) { - this.taxRateChap3 = taxRateChap3; - return this; - } - - /** - * Tax rate (Chapter 3) - * @return taxRateChap3 - */ - @javax.annotation.Nullable - public String getTaxRateChap3() { - return taxRateChap3; - } - - public void setTaxRateChap3(String taxRateChap3) { - this.taxRateChap3 = taxRateChap3; - } - - - public Form1042SRequest withholdingAllowance(Double withholdingAllowance) { - this.withholdingAllowance = withholdingAllowance; - return this; - } - - /** - * Withholding allowance - * @return withholdingAllowance - */ - @javax.annotation.Nullable - public Double getWithholdingAllowance() { - return withholdingAllowance; - } - - public void setWithholdingAllowance(Double withholdingAllowance) { - this.withholdingAllowance = withholdingAllowance; - } - - - public Form1042SRequest federalTaxWithheld(Double federalTaxWithheld) { - this.federalTaxWithheld = federalTaxWithheld; - return this; - } - - /** - * Federal tax withheld - * @return federalTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalTaxWithheld() { - return federalTaxWithheld; - } - - public void setFederalTaxWithheld(Double federalTaxWithheld) { - this.federalTaxWithheld = federalTaxWithheld; - } - - - public Form1042SRequest taxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { - this.taxNotDepositedIndicator = taxNotDepositedIndicator; - return this; - } - - /** - * Tax not deposited indicator - * @return taxNotDepositedIndicator - */ - @javax.annotation.Nullable - public Boolean getTaxNotDepositedIndicator() { - return taxNotDepositedIndicator; - } - - public void setTaxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { - this.taxNotDepositedIndicator = taxNotDepositedIndicator; - } - - - public Form1042SRequest academicIndicator(Boolean academicIndicator) { - this.academicIndicator = academicIndicator; - return this; - } - - /** - * Academic indicator - * @return academicIndicator - */ - @javax.annotation.Nullable - public Boolean getAcademicIndicator() { - return academicIndicator; - } - - public void setAcademicIndicator(Boolean academicIndicator) { - this.academicIndicator = academicIndicator; - } - - - public Form1042SRequest taxWithheldOtherAgents(Double taxWithheldOtherAgents) { - this.taxWithheldOtherAgents = taxWithheldOtherAgents; - return this; - } - - /** - * Tax withheld by other agents - * @return taxWithheldOtherAgents - */ - @javax.annotation.Nullable - public Double getTaxWithheldOtherAgents() { - return taxWithheldOtherAgents; - } - - public void setTaxWithheldOtherAgents(Double taxWithheldOtherAgents) { - this.taxWithheldOtherAgents = taxWithheldOtherAgents; - } - - - public Form1042SRequest amountRepaid(Double amountRepaid) { - this.amountRepaid = amountRepaid; - return this; - } - - /** - * Amount repaid to recipient - * @return amountRepaid - */ - @javax.annotation.Nullable - public Double getAmountRepaid() { - return amountRepaid; - } - - public void setAmountRepaid(Double amountRepaid) { - this.amountRepaid = amountRepaid; - } - - - public Form1042SRequest taxPaidAgent(Double taxPaidAgent) { - this.taxPaidAgent = taxPaidAgent; - return this; - } - - /** - * Tax paid by withholding agent - * @return taxPaidAgent - */ - @javax.annotation.Nullable - public Double getTaxPaidAgent() { - return taxPaidAgent; - } - - public void setTaxPaidAgent(Double taxPaidAgent) { - this.taxPaidAgent = taxPaidAgent; - } - - - public Form1042SRequest chap3StatusCode(String chap3StatusCode) { - this.chap3StatusCode = chap3StatusCode; - return this; - } - - /** - * Chapter 3 status code - * @return chap3StatusCode - */ - @javax.annotation.Nullable - public String getChap3StatusCode() { - return chap3StatusCode; - } - - public void setChap3StatusCode(String chap3StatusCode) { - this.chap3StatusCode = chap3StatusCode; - } - - - public Form1042SRequest chap4StatusCode(String chap4StatusCode) { - this.chap4StatusCode = chap4StatusCode; - return this; - } - - /** - * Chapter 4 status code - * @return chap4StatusCode - */ - @javax.annotation.Nullable - public String getChap4StatusCode() { - return chap4StatusCode; - } - - public void setChap4StatusCode(String chap4StatusCode) { - this.chap4StatusCode = chap4StatusCode; - } - - - public Form1042SRequest primaryWithholdingAgent(PrimaryWithholdingAgentRequest primaryWithholdingAgent) { - this.primaryWithholdingAgent = primaryWithholdingAgent; - return this; - } - - /** - * Primary withholding agent information - * @return primaryWithholdingAgent - */ - @javax.annotation.Nullable - public PrimaryWithholdingAgentRequest getPrimaryWithholdingAgent() { - return primaryWithholdingAgent; - } - - public void setPrimaryWithholdingAgent(PrimaryWithholdingAgentRequest primaryWithholdingAgent) { - this.primaryWithholdingAgent = primaryWithholdingAgent; - } - - - public Form1042SRequest intermediaryOrFlowThrough(IntermediaryOrFlowThroughRequest intermediaryOrFlowThrough) { - this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; - return this; - } - - /** - * Intermediary or flow-through entity information - * @return intermediaryOrFlowThrough - */ - @javax.annotation.Nullable - public IntermediaryOrFlowThroughRequest getIntermediaryOrFlowThrough() { - return intermediaryOrFlowThrough; - } - - public void setIntermediaryOrFlowThrough(IntermediaryOrFlowThroughRequest intermediaryOrFlowThrough) { - this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; - } - - - public Form1042SRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - public Form1042SRequest type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Form1042SRequest issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1042SRequest referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1042SRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1042SRequest recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1042SRequest tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1042SRequest recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1042SRequest address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1042SRequest address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1042SRequest city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1042SRequest state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1042SRequest zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1042SRequest email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1042SRequest accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1042SRequest officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1042SRequest nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1042SRequest countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1042SRequest federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1042SRequest postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1042SRequest stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1042SRequest tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1042SRequest noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1042SRequest secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1042SRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1042SRequest addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1042SRequest form1042SRequest = (Form1042SRequest) o; - return Objects.equals(this.uniqueFormId, form1042SRequest.uniqueFormId) && - Objects.equals(this.recipientDateOfBirth, form1042SRequest.recipientDateOfBirth) && - Objects.equals(this.recipientGiin, form1042SRequest.recipientGiin) && - Objects.equals(this.recipientForeignTin, form1042SRequest.recipientForeignTin) && - Objects.equals(this.lobCode, form1042SRequest.lobCode) && - Objects.equals(this.incomeCode, form1042SRequest.incomeCode) && - Objects.equals(this.grossIncome, form1042SRequest.grossIncome) && - Objects.equals(this.withholdingIndicator, form1042SRequest.withholdingIndicator) && - Objects.equals(this.taxCountryCode, form1042SRequest.taxCountryCode) && - Objects.equals(this.exemptionCodeChap3, form1042SRequest.exemptionCodeChap3) && - Objects.equals(this.exemptionCodeChap4, form1042SRequest.exemptionCodeChap4) && - Objects.equals(this.taxRateChap3, form1042SRequest.taxRateChap3) && - Objects.equals(this.withholdingAllowance, form1042SRequest.withholdingAllowance) && - Objects.equals(this.federalTaxWithheld, form1042SRequest.federalTaxWithheld) && - Objects.equals(this.taxNotDepositedIndicator, form1042SRequest.taxNotDepositedIndicator) && - Objects.equals(this.academicIndicator, form1042SRequest.academicIndicator) && - Objects.equals(this.taxWithheldOtherAgents, form1042SRequest.taxWithheldOtherAgents) && - Objects.equals(this.amountRepaid, form1042SRequest.amountRepaid) && - Objects.equals(this.taxPaidAgent, form1042SRequest.taxPaidAgent) && - Objects.equals(this.chap3StatusCode, form1042SRequest.chap3StatusCode) && - Objects.equals(this.chap4StatusCode, form1042SRequest.chap4StatusCode) && - Objects.equals(this.primaryWithholdingAgent, form1042SRequest.primaryWithholdingAgent) && - Objects.equals(this.intermediaryOrFlowThrough, form1042SRequest.intermediaryOrFlowThrough) && - Objects.equals(this.stateAndLocalWithholding, form1042SRequest.stateAndLocalWithholding) && - Objects.equals(this.type, form1042SRequest.type) && - Objects.equals(this.issuerId, form1042SRequest.issuerId) && - Objects.equals(this.referenceId, form1042SRequest.referenceId) && - Objects.equals(this.recipientTin, form1042SRequest.recipientTin) && - Objects.equals(this.recipientName, form1042SRequest.recipientName) && - Objects.equals(this.tinType, form1042SRequest.tinType) && - Objects.equals(this.recipientSecondName, form1042SRequest.recipientSecondName) && - Objects.equals(this.address, form1042SRequest.address) && - Objects.equals(this.address2, form1042SRequest.address2) && - Objects.equals(this.city, form1042SRequest.city) && - Objects.equals(this.state, form1042SRequest.state) && - Objects.equals(this.zip, form1042SRequest.zip) && - Objects.equals(this.email, form1042SRequest.email) && - Objects.equals(this.accountNumber, form1042SRequest.accountNumber) && - Objects.equals(this.officeCode, form1042SRequest.officeCode) && - Objects.equals(this.nonUsProvince, form1042SRequest.nonUsProvince) && - Objects.equals(this.countryCode, form1042SRequest.countryCode) && - Objects.equals(this.federalEFile, form1042SRequest.federalEFile) && - Objects.equals(this.postalMail, form1042SRequest.postalMail) && - Objects.equals(this.stateEFile, form1042SRequest.stateEFile) && - Objects.equals(this.tinMatch, form1042SRequest.tinMatch) && - Objects.equals(this.noTin, form1042SRequest.noTin) && - Objects.equals(this.secondTinNotice, form1042SRequest.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, form1042SRequest.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, form1042SRequest.addressVerification); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(uniqueFormId, recipientDateOfBirth, recipientGiin, recipientForeignTin, lobCode, incomeCode, grossIncome, withholdingIndicator, taxCountryCode, exemptionCodeChap3, exemptionCodeChap4, taxRateChap3, withholdingAllowance, federalTaxWithheld, taxNotDepositedIndicator, academicIndicator, taxWithheldOtherAgents, amountRepaid, taxPaidAgent, chap3StatusCode, chap4StatusCode, primaryWithholdingAgent, intermediaryOrFlowThrough, stateAndLocalWithholding, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1042SRequest {\n"); - sb.append(" uniqueFormId: ").append(toIndentedString(uniqueFormId)).append("\n"); - sb.append(" recipientDateOfBirth: ").append(toIndentedString(recipientDateOfBirth)).append("\n"); - sb.append(" recipientGiin: ").append(toIndentedString(recipientGiin)).append("\n"); - sb.append(" recipientForeignTin: ").append(toIndentedString(recipientForeignTin)).append("\n"); - sb.append(" lobCode: ").append(toIndentedString(lobCode)).append("\n"); - sb.append(" incomeCode: ").append(toIndentedString(incomeCode)).append("\n"); - sb.append(" grossIncome: ").append(toIndentedString(grossIncome)).append("\n"); - sb.append(" withholdingIndicator: ").append(toIndentedString(withholdingIndicator)).append("\n"); - sb.append(" taxCountryCode: ").append(toIndentedString(taxCountryCode)).append("\n"); - sb.append(" exemptionCodeChap3: ").append(toIndentedString(exemptionCodeChap3)).append("\n"); - sb.append(" exemptionCodeChap4: ").append(toIndentedString(exemptionCodeChap4)).append("\n"); - sb.append(" taxRateChap3: ").append(toIndentedString(taxRateChap3)).append("\n"); - sb.append(" withholdingAllowance: ").append(toIndentedString(withholdingAllowance)).append("\n"); - sb.append(" federalTaxWithheld: ").append(toIndentedString(federalTaxWithheld)).append("\n"); - sb.append(" taxNotDepositedIndicator: ").append(toIndentedString(taxNotDepositedIndicator)).append("\n"); - sb.append(" academicIndicator: ").append(toIndentedString(academicIndicator)).append("\n"); - sb.append(" taxWithheldOtherAgents: ").append(toIndentedString(taxWithheldOtherAgents)).append("\n"); - sb.append(" amountRepaid: ").append(toIndentedString(amountRepaid)).append("\n"); - sb.append(" taxPaidAgent: ").append(toIndentedString(taxPaidAgent)).append("\n"); - sb.append(" chap3StatusCode: ").append(toIndentedString(chap3StatusCode)).append("\n"); - sb.append(" chap4StatusCode: ").append(toIndentedString(chap4StatusCode)).append("\n"); - sb.append(" primaryWithholdingAgent: ").append(toIndentedString(primaryWithholdingAgent)).append("\n"); - sb.append(" intermediaryOrFlowThrough: ").append(toIndentedString(intermediaryOrFlowThrough)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1042SRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1042SRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1042SRequest is not found in the empty JSON string", Form1042SRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1042SRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042SRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("uniqueFormId") != null && !jsonObj.get("uniqueFormId").isJsonNull()) && !jsonObj.get("uniqueFormId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `uniqueFormId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uniqueFormId").toString())); - } - if ((jsonObj.get("recipientGiin") != null && !jsonObj.get("recipientGiin").isJsonNull()) && !jsonObj.get("recipientGiin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientGiin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientGiin").toString())); - } - if ((jsonObj.get("recipientForeignTin") != null && !jsonObj.get("recipientForeignTin").isJsonNull()) && !jsonObj.get("recipientForeignTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientForeignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientForeignTin").toString())); - } - if ((jsonObj.get("lobCode") != null && !jsonObj.get("lobCode").isJsonNull()) && !jsonObj.get("lobCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lobCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lobCode").toString())); - } - if ((jsonObj.get("incomeCode") != null && !jsonObj.get("incomeCode").isJsonNull()) && !jsonObj.get("incomeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `incomeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("incomeCode").toString())); - } - if ((jsonObj.get("withholdingIndicator") != null && !jsonObj.get("withholdingIndicator").isJsonNull()) && !jsonObj.get("withholdingIndicator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `withholdingIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("withholdingIndicator").toString())); - } - if ((jsonObj.get("taxCountryCode") != null && !jsonObj.get("taxCountryCode").isJsonNull()) && !jsonObj.get("taxCountryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxCountryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxCountryCode").toString())); - } - if ((jsonObj.get("exemptionCodeChap3") != null && !jsonObj.get("exemptionCodeChap3").isJsonNull()) && !jsonObj.get("exemptionCodeChap3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exemptionCodeChap3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptionCodeChap3").toString())); - } - if ((jsonObj.get("exemptionCodeChap4") != null && !jsonObj.get("exemptionCodeChap4").isJsonNull()) && !jsonObj.get("exemptionCodeChap4").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exemptionCodeChap4` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptionCodeChap4").toString())); - } - if ((jsonObj.get("taxRateChap3") != null && !jsonObj.get("taxRateChap3").isJsonNull()) && !jsonObj.get("taxRateChap3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxRateChap3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxRateChap3").toString())); - } - if ((jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) && !jsonObj.get("chap3StatusCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chap3StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap3StatusCode").toString())); - } - if ((jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) && !jsonObj.get("chap4StatusCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chap4StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap4StatusCode").toString())); - } - // validate the optional field `primaryWithholdingAgent` - if (jsonObj.get("primaryWithholdingAgent") != null && !jsonObj.get("primaryWithholdingAgent").isJsonNull()) { - PrimaryWithholdingAgentRequest.validateJsonElement(jsonObj.get("primaryWithholdingAgent")); - } - // validate the optional field `intermediaryOrFlowThrough` - if (jsonObj.get("intermediaryOrFlowThrough") != null && !jsonObj.get("intermediaryOrFlowThrough").isJsonNull()) { - IntermediaryOrFlowThroughRequest.validateJsonElement(jsonObj.get("intermediaryOrFlowThrough")); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1042SRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1042SRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1042SRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1042SRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1042SRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1042SRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1042SRequest - * @throws IOException if the JSON string is invalid with respect to Form1042SRequest - */ - public static Form1042SRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1042SRequest.class); - } - - /** - * Convert an instance of Form1042SRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SResponse.java deleted file mode 100644 index e78c2a6..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SResponse.java +++ /dev/null @@ -1,1447 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1042SResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1042SResponse { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - /** - * Gets or Sets tinType - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public Form1042SResponse() { - } - - public Form1042SResponse( - TypeEnum type - ) { - this(); - this.type = type; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - - public Form1042SResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Form1042SResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1042SResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - public Form1042SResponse tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Get tinType - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1042SResponse id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public Form1042SResponse issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Get issuerId - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1042SResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Get issuerReferenceId - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1042SResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Get issuerTin - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1042SResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Get taxYear - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1042SResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1042SResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get recipientName - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1042SResponse recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Get recipientTin - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1042SResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Get recipientSecondName - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1042SResponse address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1042SResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Get address2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1042SResponse city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1042SResponse state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1042SResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1042SResponse email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1042SResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1042SResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Get officeCode - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1042SResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Get nonUsProvince - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1042SResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1042SResponse federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Get federalEFile - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1042SResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Get postalMail - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1042SResponse stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Get stateEFile - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1042SResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Get tinMatch - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1042SResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Get noTin - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1042SResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Get secondTinNotice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1042SResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Get addressVerification - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1042SResponse federalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - return this; - } - - /** - * Get federalEfileStatus - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - public void setFederalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - } - - - public Form1042SResponse eDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - return this; - } - - /** - * Get eDeliveryStatus - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - } - - - public Form1042SResponse stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1042SResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); - return this; - } - - /** - * Get stateEfileStatus - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - } - - - public Form1042SResponse postalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - return this; - } - - /** - * Get postalMailStatus - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - public void setPostalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - } - - - public Form1042SResponse tinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - return this; - } - - /** - * Get tinMatchStatus - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - public void setTinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - } - - - public Form1042SResponse addressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - return this; - } - - /** - * Get addressVerificationStatus - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - } - - - public Form1042SResponse validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1042SResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } - - /** - * Get validationErrors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1042SResponse form1042SResponse = (Form1042SResponse) o; - return Objects.equals(this.type, form1042SResponse.type) && - Objects.equals(this.createdAt, form1042SResponse.createdAt) && - Objects.equals(this.updatedAt, form1042SResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1042SResponse.stateAndLocalWithholding) && - Objects.equals(this.tinType, form1042SResponse.tinType) && - Objects.equals(this.id, form1042SResponse.id) && - Objects.equals(this.issuerId, form1042SResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1042SResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1042SResponse.issuerTin) && - Objects.equals(this.taxYear, form1042SResponse.taxYear) && - Objects.equals(this.referenceId, form1042SResponse.referenceId) && - Objects.equals(this.recipientName, form1042SResponse.recipientName) && - Objects.equals(this.recipientTin, form1042SResponse.recipientTin) && - Objects.equals(this.recipientSecondName, form1042SResponse.recipientSecondName) && - Objects.equals(this.address, form1042SResponse.address) && - Objects.equals(this.address2, form1042SResponse.address2) && - Objects.equals(this.city, form1042SResponse.city) && - Objects.equals(this.state, form1042SResponse.state) && - Objects.equals(this.zip, form1042SResponse.zip) && - Objects.equals(this.email, form1042SResponse.email) && - Objects.equals(this.accountNumber, form1042SResponse.accountNumber) && - Objects.equals(this.officeCode, form1042SResponse.officeCode) && - Objects.equals(this.nonUsProvince, form1042SResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1042SResponse.countryCode) && - Objects.equals(this.federalEFile, form1042SResponse.federalEFile) && - Objects.equals(this.postalMail, form1042SResponse.postalMail) && - Objects.equals(this.stateEFile, form1042SResponse.stateEFile) && - Objects.equals(this.tinMatch, form1042SResponse.tinMatch) && - Objects.equals(this.noTin, form1042SResponse.noTin) && - Objects.equals(this.secondTinNotice, form1042SResponse.secondTinNotice) && - Objects.equals(this.addressVerification, form1042SResponse.addressVerification) && - Objects.equals(this.federalEfileStatus, form1042SResponse.federalEfileStatus) && - Objects.equals(this.eDeliveryStatus, form1042SResponse.eDeliveryStatus) && - Objects.equals(this.stateEfileStatus, form1042SResponse.stateEfileStatus) && - Objects.equals(this.postalMailStatus, form1042SResponse.postalMailStatus) && - Objects.equals(this.tinMatchStatus, form1042SResponse.tinMatchStatus) && - Objects.equals(this.addressVerificationStatus, form1042SResponse.addressVerificationStatus) && - Objects.equals(this.validationErrors, form1042SResponse.validationErrors); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1042SResponse {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("tinType"); - openapiFields.add("id"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("referenceId"); - openapiFields.add("recipientName"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("addressVerification"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("validationErrors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1042SResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1042SResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1042SResponse is not found in the empty JSON string", Form1042SResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1042SResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042SResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1042SResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1042SResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1042SResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1042SResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1042SResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1042SResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1042SResponse - * @throws IOException if the JSON string is invalid with respect to Form1042SResponse - */ - public static Form1042SResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1042SResponse.class); - } - - /** - * Convert an instance of Form1042SResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java index cbbc83c..f144f02 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java @@ -20,7 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualReference; +import Avalara.SDK.model.A1099.V2.CoveredIndividual; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -31,6 +31,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -62,29 +63,177 @@ import Avalara.SDK.JSON; /** - * Form1095B + * Form 1095-B: Health Coverage */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1095B { + public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME) + private String employeeFirstName; + + public static final String SERIALIZED_NAME_EMPLOYEE_MIDDLE_NAME = "employeeMiddleName"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_MIDDLE_NAME) + private String employeeMiddleName; + + public static final String SERIALIZED_NAME_EMPLOYEE_LAST_NAME = "employeeLastName"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_LAST_NAME) + private String employeeLastName; + + public static final String SERIALIZED_NAME_EMPLOYEE_NAME_SUFFIX = "employeeNameSuffix"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_NAME_SUFFIX) + private String employeeNameSuffix; + + public static final String SERIALIZED_NAME_EMPLOYEE_DATE_OF_BIRTH = "employeeDateOfBirth"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_DATE_OF_BIRTH) + private LocalDate employeeDateOfBirth; + + /** + * Origin of health coverage code Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later) + */ + @JsonAdapter(OriginOfHealthCoverageCodeEnum.Adapter.class) + public enum OriginOfHealthCoverageCodeEnum { + A("A"), + + B("B"), + + C("C"), + + D("D"), + + E("E"), + + F("F"), + + G("G"); + + private String value; + + OriginOfHealthCoverageCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OriginOfHealthCoverageCodeEnum fromValue(String value) { + for (OriginOfHealthCoverageCodeEnum b : OriginOfHealthCoverageCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OriginOfHealthCoverageCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OriginOfHealthCoverageCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OriginOfHealthCoverageCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OriginOfHealthCoverageCodeEnum.fromValue(value); + } + } + public static final String SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE = "originOfHealthCoverageCode"; @SerializedName(SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE) - private String originOfHealthCoverageCode; + private OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode; public static final String SERIALIZED_NAME_COVERED_INDIVIDUALS = "coveredIndividuals"; @SerializedName(SERIALIZED_NAME_COVERED_INDIVIDUALS) - private List coveredIndividuals; + private List coveredIndividuals; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; + /** + * Form type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1099_NEC("1099-NEC"), + + _1099_MISC("1099-MISC"), + + _1099_DIV("1099-DIV"), + + _1099_R("1099-R"), + + _1099_K("1099-K"), + + _1095_B("1095-B"), + + _1042_S("1042-S"), + + _1095_C("1095-C"), + + _1099_INT("1099-INT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private String type; + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; + private String issuerId; public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) @@ -98,81 +247,79 @@ public class Form1095B { @SerializedName(SERIALIZED_NAME_TAX_YEAR) private Integer taxYear; - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private Form1099StatusDetail postalMailStatus; + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; + /** + * Type of TIN (Tax ID Number) + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EMPTY("Empty"), + + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"); + + private String value; + + TinTypeEnum(String value) { + this.value = value; + } - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private Form1099StatusDetail tinMatchStatus; + public String getValue() { + return value; + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; + @Override + public String toString() { + return String.valueOf(value); + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private Form1099StatusDetail addressVerificationStatus; + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private Form1099StatusDetail eDeliveryStatus; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; + private TinTypeEnum tinType; public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) @@ -198,6 +345,18 @@ public class Form1095B { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -206,13 +365,65 @@ public class Form1095B { @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) private String countryCode; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) @@ -226,38 +437,154 @@ public class Form1095B { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholding stateAndLocalWithholding; - public Form1095B() { } - public Form1095B originOfHealthCoverageCode(String originOfHealthCoverageCode) { + public Form1095B( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public Form1095B employeeFirstName(String employeeFirstName) { + this.employeeFirstName = employeeFirstName; + return this; + } + + /** + * Employee's first name + * @return employeeFirstName + */ + @javax.annotation.Nullable + public String getEmployeeFirstName() { + return employeeFirstName; + } + + public void setEmployeeFirstName(String employeeFirstName) { + this.employeeFirstName = employeeFirstName; + } + + + public Form1095B employeeMiddleName(String employeeMiddleName) { + this.employeeMiddleName = employeeMiddleName; + return this; + } + + /** + * Employee's middle name + * @return employeeMiddleName + */ + @javax.annotation.Nullable + public String getEmployeeMiddleName() { + return employeeMiddleName; + } + + public void setEmployeeMiddleName(String employeeMiddleName) { + this.employeeMiddleName = employeeMiddleName; + } + + + public Form1095B employeeLastName(String employeeLastName) { + this.employeeLastName = employeeLastName; + return this; + } + + /** + * Employee's last name + * @return employeeLastName + */ + @javax.annotation.Nullable + public String getEmployeeLastName() { + return employeeLastName; + } + + public void setEmployeeLastName(String employeeLastName) { + this.employeeLastName = employeeLastName; + } + + + public Form1095B employeeNameSuffix(String employeeNameSuffix) { + this.employeeNameSuffix = employeeNameSuffix; + return this; + } + + /** + * Employee's name suffix + * @return employeeNameSuffix + */ + @javax.annotation.Nullable + public String getEmployeeNameSuffix() { + return employeeNameSuffix; + } + + public void setEmployeeNameSuffix(String employeeNameSuffix) { + this.employeeNameSuffix = employeeNameSuffix; + } + + + public Form1095B employeeDateOfBirth(LocalDate employeeDateOfBirth) { + this.employeeDateOfBirth = employeeDateOfBirth; + return this; + } + + /** + * Employee's date of birth + * @return employeeDateOfBirth + */ + @javax.annotation.Nullable + public LocalDate getEmployeeDateOfBirth() { + return employeeDateOfBirth; + } + + public void setEmployeeDateOfBirth(LocalDate employeeDateOfBirth) { + this.employeeDateOfBirth = employeeDateOfBirth; + } + + + public Form1095B originOfHealthCoverageCode(OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode) { this.originOfHealthCoverageCode = originOfHealthCoverageCode; return this; } /** - * Get originOfHealthCoverageCode + * Origin of health coverage code Available values: - A: Small Business Health Options Program (SHOP) - B: Employer-sponsored coverage - C: Government-sponsored program - D: Individual market insurance - E: Multiemployer plan - F: Other designated minimum essential coverage - G: Employer-sponsored coverage that is an individual coverage HRA (valid for tax years 2020 and later) * @return originOfHealthCoverageCode */ @javax.annotation.Nullable - public String getOriginOfHealthCoverageCode() { + public OriginOfHealthCoverageCodeEnum getOriginOfHealthCoverageCode() { return originOfHealthCoverageCode; } - public void setOriginOfHealthCoverageCode(String originOfHealthCoverageCode) { + public void setOriginOfHealthCoverageCode(OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode) { this.originOfHealthCoverageCode = originOfHealthCoverageCode; } - public Form1095B coveredIndividuals(List coveredIndividuals) { + public Form1095B coveredIndividuals(List coveredIndividuals) { this.coveredIndividuals = coveredIndividuals; return this; } - public Form1095B addCoveredIndividualsItem(CoveredIndividualReference coveredIndividualsItem) { + public Form1095B addCoveredIndividualsItem(CoveredIndividual coveredIndividualsItem) { if (this.coveredIndividuals == null) { this.coveredIndividuals = new ArrayList<>(); } @@ -266,72 +593,64 @@ public Form1095B addCoveredIndividualsItem(CoveredIndividualReference coveredInd } /** - * Get coveredIndividuals + * Covered individuals information - At least one month of coverage must be entered if it's not a correction. * @return coveredIndividuals */ @javax.annotation.Nullable - public List getCoveredIndividuals() { + public List getCoveredIndividuals() { return coveredIndividuals; } - public void setCoveredIndividuals(List coveredIndividuals) { + public void setCoveredIndividuals(List coveredIndividuals) { this.coveredIndividuals = coveredIndividuals; } - public Form1095B id(String id) { - this.id = id; + public Form1095B type(TypeEnum type) { + this.type = type; return this; } /** - * Get id - * @return id + * Form type + * @return type */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; } - - public Form1095B type(String type) { + public void setType(TypeEnum type) { this.type = type; - return this; } + /** - * Get type - * @return type + * Form ID. Unique identifier set when the record is created. + * @return id */ @javax.annotation.Nullable - public String getType() { - return type; + public String getId() { + return id; } - public void setType(String type) { - this.type = type; - } - public Form1095B issuerId(Integer issuerId) { + public Form1095B issuerId(String issuerId) { this.issuerId = issuerId; return this; } /** - * Get issuerId + * Issuer ID - only required when creating forms * @return issuerId */ @javax.annotation.Nullable - public Integer getIssuerId() { + public String getIssuerId() { return issuerId; } - public void setIssuerId(Integer issuerId) { + public void setIssuerId(String issuerId) { this.issuerId = issuerId; } @@ -342,7 +661,7 @@ public Form1095B issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID - only required when creating forms * @return issuerReferenceId */ @javax.annotation.Nullable @@ -361,7 +680,7 @@ public Form1095B issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN - readonly * @return issuerTin */ @javax.annotation.Nullable @@ -380,7 +699,7 @@ public Form1095B taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax Year - only required when creating forms * @return taxYear */ @javax.annotation.Nullable @@ -393,239 +712,193 @@ public void setTaxYear(Integer taxYear) { } - public Form1095B federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Get federalEfile - * @return federalEfile - */ - @javax.annotation.Nullable - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - public Form1095B federalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - return this; - } - - /** - * Get federalEfileStatus - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - public void setFederalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - } - - - public Form1095B stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public Form1095B referenceId(String referenceId) { + this.referenceId = referenceId; return this; } /** - * Get stateEfile - * @return stateEfile + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId */ @javax.annotation.Nullable - public Boolean getStateEfile() { - return stateEfile; + public String getReferenceId() { + return referenceId; } - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; } - public Form1095B stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1095B addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); + public Form1095B tin(String tin) { + this.tin = tin; return this; } /** - * Get stateEfileStatus - * @return stateEfileStatus + * Recipient's Federal Tax Identification Number (TIN). + * @return tin */ @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; + public String getTin() { + return tin; } - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; + public void setTin(String tin) { + this.tin = tin; } - public Form1095B postalMail(Boolean postalMail) { - this.postalMail = postalMail; + public Form1095B recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get postalMail - * @return postalMail + * Recipient name + * @return recipientName */ @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; + public String getRecipientName() { + return recipientName; } - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } - public Form1095B postalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public Form1095B tinType(TinTypeEnum tinType) { + this.tinType = tinType; return this; } /** - * Get postalMailStatus - * @return postalMailStatus + * Type of TIN (Tax ID Number) + * @return tinType */ @javax.annotation.Nullable - public Form1099StatusDetail getPostalMailStatus() { - return postalMailStatus; + public TinTypeEnum getTinType() { + return tinType; } - public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; } - public Form1095B tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public Form1095B recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; return this; } /** - * Get tinMatch - * @return tinMatch + * Recipient second name + * @return recipientSecondName */ @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; + public String getRecipientSecondName() { + return recipientSecondName; } - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; } - public Form1095B tinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public Form1095B address(String address) { + this.address = address; return this; } /** - * Get tinMatchStatus - * @return tinMatchStatus + * Address. + * @return address */ @javax.annotation.Nullable - public Form1099StatusDetail getTinMatchStatus() { - return tinMatchStatus; + public String getAddress() { + return address; } - public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public void setAddress(String address) { + this.address = address; } - public Form1095B addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public Form1095B address2(String address2) { + this.address2 = address2; return this; } /** - * Get addressVerification - * @return addressVerification + * Address line 2. + * @return address2 */ @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; + public String getAddress2() { + return address2; } - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public void setAddress2(String address2) { + this.address2 = address2; } - public Form1095B addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public Form1095B city(String city) { + this.city = city; return this; } /** - * Get addressVerificationStatus - * @return addressVerificationStatus + * City. + * @return city */ @javax.annotation.Nullable - public Form1099StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; + public String getCity() { + return city; } - public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public void setCity(String city) { + this.city = city; } - public Form1095B eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public Form1095B state(String state) { + this.state = state; return this; } /** - * Get eDeliveryStatus - * @return eDeliveryStatus + * Two-letter US state or Canadian province code (required for US/CA addresses). + * @return state */ @javax.annotation.Nullable - public Form1099StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; + public String getState() { + return state; } - public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public void setState(String state) { + this.state = state; } - public Form1095B referenceId(String referenceId) { - this.referenceId = referenceId; + public Form1095B zip(String zip) { + this.zip = zip; return this; } /** - * Get referenceId - * @return referenceId + * ZIP/postal code. + * @return zip */ @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; + public String getZip() { + return zip; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; + public void setZip(String zip) { + this.zip = zip; } @@ -635,7 +908,7 @@ public Form1095B email(String email) { } /** - * Get email + * Recipient's Contact email address. * @return email */ @javax.annotation.Nullable @@ -648,325 +921,321 @@ public void setEmail(String email) { } - public Form1095B tinType(String tinType) { - this.tinType = tinType; + public Form1095B accountNumber(String accountNumber) { + this.accountNumber = accountNumber; return this; } /** - * Get tinType - * @return tinType + * Account number + * @return accountNumber */ @javax.annotation.Nullable - public String getTinType() { - return tinType; + public String getAccountNumber() { + return accountNumber; } - public void setTinType(String tinType) { - this.tinType = tinType; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; } - public Form1095B fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public Form1095B officeCode(String officeCode) { + this.officeCode = officeCode; return this; } /** - * Get fatcaFilingRequirement - * @return fatcaFilingRequirement + * Office code + * @return officeCode */ @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; + public String getOfficeCode() { + return officeCode; } - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; } - public Form1095B tin(String tin) { - this.tin = tin; + public Form1095B nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get tin - * @return tin + * Province or region for non-US/CA addresses. + * @return nonUsProvince */ @javax.annotation.Nullable - public String getTin() { - return tin; + public String getNonUsProvince() { + return nonUsProvince; } - public void setTin(String tin) { - this.tin = tin; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } - public Form1095B noTin(Boolean noTin) { - this.noTin = noTin; + public Form1095B countryCode(String countryCode) { + this.countryCode = countryCode; return this; } /** - * Get noTin - * @return noTin + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public String getCountryCode() { + return countryCode; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; } - public Form1095B secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public Form1095B federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; return this; } /** - * Get secondTinNotice - * @return secondTinNotice + * Date when federal e-filing should be scheduled for this form + * @return federalEfileDate */ @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; + public LocalDate getFederalEfileDate() { + return federalEfileDate; } - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; } - public Form1095B recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1095B postalMail(Boolean postalMail) { + this.postalMail = postalMail; return this; } /** - * Get recipientName - * @return recipientName + * Boolean indicating that postal mailing to the recipient should be scheduled for this form + * @return postalMail */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public Boolean getPostalMail() { + return postalMail; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; } - public Form1095B recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public Form1095B stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; return this; } /** - * Get recipientSecondName - * @return recipientSecondName + * Date when state e-filing should be scheduled for this form + * @return stateEfileDate */ @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; + public LocalDate getStateEfileDate() { + return stateEfileDate; } - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; } - public Form1095B address(String address) { - this.address = address; + public Form1095B recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; return this; } /** - * Get address - * @return address + * Date when recipient e-delivery should be scheduled for this form + * @return recipientEdeliveryDate */ @javax.annotation.Nullable - public String getAddress() { - return address; + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; } - public void setAddress(String address) { - this.address = address; + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; } - public Form1095B address2(String address2) { - this.address2 = address2; + public Form1095B tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; return this; } /** - * Get address2 - * @return address2 + * Boolean indicating that TIN Matching should be scheduled for this form + * @return tinMatch */ @javax.annotation.Nullable - public String getAddress2() { - return address2; + public Boolean getTinMatch() { + return tinMatch; } - public void setAddress2(String address2) { - this.address2 = address2; + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; } - public Form1095B city(String city) { - this.city = city; + public Form1095B noTin(Boolean noTin) { + this.noTin = noTin; return this; } /** - * Get city - * @return city + * No TIN indicator + * @return noTin */ @javax.annotation.Nullable - public String getCity() { - return city; + public Boolean getNoTin() { + return noTin; } - public void setCity(String city) { - this.city = city; + public void setNoTin(Boolean noTin) { + this.noTin = noTin; } - public Form1095B state(String state) { - this.state = state; + public Form1095B addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * Get state - * @return state + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public String getState() { - return state; + public Boolean getAddressVerification() { + return addressVerification; } - public void setState(String state) { - this.state = state; + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } - public Form1095B zip(String zip) { - this.zip = zip; + public Form1095B stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; return this; } /** - * Get zip - * @return zip + * State and local withholding information + * @return stateAndLocalWithholding */ @javax.annotation.Nullable - public String getZip() { - return zip; + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; } - public void setZip(String zip) { - this.zip = zip; + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; } - public Form1095B nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; + public Form1095B secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; return this; } /** - * Get nonUsProvince - * @return nonUsProvince + * Second TIN notice + * @return secondTinNotice */ @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; + public Boolean getSecondTinNotice() { + return secondTinNotice; } - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; } - public Form1095B countryCode(String countryCode) { - this.countryCode = countryCode; - return this; + /** + * Federal e-file status + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; } + + /** - * Get countryCode - * @return countryCode + * State e-file status + * @return stateEfileStatus */ @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; + public List getStateEfileStatus() { + return stateEfileStatus; } - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - public Form1095B accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; + /** + * Postal mail to recipient status + * @return postalMailStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; } + + /** - * Get accountNumber - * @return accountNumber + * TIN Match status + * @return tinMatchStatus */ @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - public Form1095B officeCode(String officeCode) { - this.officeCode = officeCode; - return this; + /** + * Address verification status + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; } + + /** - * Get officeCode - * @return officeCode + * EDelivery status + * @return eDeliveryStatus */ @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; } - public Form1095B validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1095B addValidationErrorsItem(ValidationError validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } /** - * Get validationErrors + * Validation errors * @return validationErrors */ @javax.annotation.Nullable @@ -974,18 +1243,10 @@ public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - public Form1095B createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } /** - * Get createdAt + * Date time when the record was created. * @return createdAt */ @javax.annotation.Nullable @@ -993,18 +1254,10 @@ public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public Form1095B updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } /** - * Get updatedAt + * Date time when the record was last updated. * @return updatedAt */ @javax.annotation.Nullable @@ -1012,28 +1265,6 @@ public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1095B stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholding getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } @@ -1046,47 +1277,52 @@ public boolean equals(Object o) { return false; } Form1095B form1095B = (Form1095B) o; - return Objects.equals(this.originOfHealthCoverageCode, form1095B.originOfHealthCoverageCode) && + return Objects.equals(this.employeeFirstName, form1095B.employeeFirstName) && + Objects.equals(this.employeeMiddleName, form1095B.employeeMiddleName) && + Objects.equals(this.employeeLastName, form1095B.employeeLastName) && + Objects.equals(this.employeeNameSuffix, form1095B.employeeNameSuffix) && + Objects.equals(this.employeeDateOfBirth, form1095B.employeeDateOfBirth) && + Objects.equals(this.originOfHealthCoverageCode, form1095B.originOfHealthCoverageCode) && Objects.equals(this.coveredIndividuals, form1095B.coveredIndividuals) && - Objects.equals(this.id, form1095B.id) && Objects.equals(this.type, form1095B.type) && + Objects.equals(this.id, form1095B.id) && Objects.equals(this.issuerId, form1095B.issuerId) && Objects.equals(this.issuerReferenceId, form1095B.issuerReferenceId) && Objects.equals(this.issuerTin, form1095B.issuerTin) && Objects.equals(this.taxYear, form1095B.taxYear) && - Objects.equals(this.federalEfile, form1095B.federalEfile) && - Objects.equals(this.federalEfileStatus, form1095B.federalEfileStatus) && - Objects.equals(this.stateEfile, form1095B.stateEfile) && - Objects.equals(this.stateEfileStatus, form1095B.stateEfileStatus) && - Objects.equals(this.postalMail, form1095B.postalMail) && - Objects.equals(this.postalMailStatus, form1095B.postalMailStatus) && - Objects.equals(this.tinMatch, form1095B.tinMatch) && - Objects.equals(this.tinMatchStatus, form1095B.tinMatchStatus) && - Objects.equals(this.addressVerification, form1095B.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1095B.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1095B.eDeliveryStatus) && Objects.equals(this.referenceId, form1095B.referenceId) && - Objects.equals(this.email, form1095B.email) && - Objects.equals(this.tinType, form1095B.tinType) && - Objects.equals(this.fatcaFilingRequirement, form1095B.fatcaFilingRequirement) && Objects.equals(this.tin, form1095B.tin) && - Objects.equals(this.noTin, form1095B.noTin) && - Objects.equals(this.secondTinNotice, form1095B.secondTinNotice) && Objects.equals(this.recipientName, form1095B.recipientName) && + Objects.equals(this.tinType, form1095B.tinType) && Objects.equals(this.recipientSecondName, form1095B.recipientSecondName) && Objects.equals(this.address, form1095B.address) && Objects.equals(this.address2, form1095B.address2) && Objects.equals(this.city, form1095B.city) && Objects.equals(this.state, form1095B.state) && Objects.equals(this.zip, form1095B.zip) && - Objects.equals(this.nonUsProvince, form1095B.nonUsProvince) && - Objects.equals(this.countryCode, form1095B.countryCode) && + Objects.equals(this.email, form1095B.email) && Objects.equals(this.accountNumber, form1095B.accountNumber) && Objects.equals(this.officeCode, form1095B.officeCode) && + Objects.equals(this.nonUsProvince, form1095B.nonUsProvince) && + Objects.equals(this.countryCode, form1095B.countryCode) && + Objects.equals(this.federalEfileDate, form1095B.federalEfileDate) && + Objects.equals(this.postalMail, form1095B.postalMail) && + Objects.equals(this.stateEfileDate, form1095B.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1095B.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1095B.tinMatch) && + Objects.equals(this.noTin, form1095B.noTin) && + Objects.equals(this.addressVerification, form1095B.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1095B.stateAndLocalWithholding) && + Objects.equals(this.secondTinNotice, form1095B.secondTinNotice) && + Objects.equals(this.federalEfileStatus, form1095B.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1095B.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1095B.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1095B.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1095B.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1095B.eDeliveryStatus) && Objects.equals(this.validationErrors, form1095B.validationErrors) && Objects.equals(this.createdAt, form1095B.createdAt) && - Objects.equals(this.updatedAt, form1095B.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1095B.stateAndLocalWithholding); + Objects.equals(this.updatedAt, form1095B.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1095,7 +1331,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(originOfHealthCoverageCode, coveredIndividuals, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, fatcaFilingRequirement, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -1109,47 +1345,52 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Form1095B {\n"); + sb.append(" employeeFirstName: ").append(toIndentedString(employeeFirstName)).append("\n"); + sb.append(" employeeMiddleName: ").append(toIndentedString(employeeMiddleName)).append("\n"); + sb.append(" employeeLastName: ").append(toIndentedString(employeeLastName)).append("\n"); + sb.append(" employeeNameSuffix: ").append(toIndentedString(employeeNameSuffix)).append("\n"); + sb.append(" employeeDateOfBirth: ").append(toIndentedString(employeeDateOfBirth)).append("\n"); sb.append(" originOfHealthCoverageCode: ").append(toIndentedString(originOfHealthCoverageCode)).append("\n"); sb.append(" coveredIndividuals: ").append(toIndentedString(coveredIndividuals)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1172,48 +1413,56 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("id"); openapiFields.add("type"); + openapiFields.add("id"); openapiFields.add("issuerId"); openapiFields.add("issuerReferenceId"); openapiFields.add("issuerTin"); openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); + openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); + openapiFields.add("email"); openapiFields.add("accountNumber"); openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("secondTinNotice"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("employeeFirstName"); + openapiRequiredFields.add("employeeLastName"); + openapiRequiredFields.add("originOfHealthCoverageCode"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1236,10 +1485,31 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095B` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1095B.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("employeeFirstName") != null && !jsonObj.get("employeeFirstName").isJsonNull()) && !jsonObj.get("employeeFirstName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString())); + } + if ((jsonObj.get("employeeMiddleName") != null && !jsonObj.get("employeeMiddleName").isJsonNull()) && !jsonObj.get("employeeMiddleName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeMiddleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeMiddleName").toString())); + } + if ((jsonObj.get("employeeLastName") != null && !jsonObj.get("employeeLastName").isJsonNull()) && !jsonObj.get("employeeLastName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeLastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeLastName").toString())); + } + if ((jsonObj.get("employeeNameSuffix") != null && !jsonObj.get("employeeNameSuffix").isJsonNull()) && !jsonObj.get("employeeNameSuffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeNameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeNameSuffix").toString())); + } if ((jsonObj.get("originOfHealthCoverageCode") != null && !jsonObj.get("originOfHealthCoverageCode").isJsonNull()) && !jsonObj.get("originOfHealthCoverageCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `originOfHealthCoverageCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originOfHealthCoverageCode").toString())); } + // validate the required field `originOfHealthCoverageCode` + OriginOfHealthCoverageCodeEnum.validateJsonElement(jsonObj.get("originOfHealthCoverageCode")); if (jsonObj.get("coveredIndividuals") != null && !jsonObj.get("coveredIndividuals").isJsonNull()) { JsonArray jsonArraycoveredIndividuals = jsonObj.getAsJsonArray("coveredIndividuals"); if (jsonArraycoveredIndividuals != null) { @@ -1250,15 +1520,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `coveredIndividuals` (array) for (int i = 0; i < jsonArraycoveredIndividuals.size(); i++) { - CoveredIndividualReference.validateJsonElement(jsonArraycoveredIndividuals.get(i)); + CoveredIndividual.validateJsonElement(jsonArraycoveredIndividuals.get(i)); }; } } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); } if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); @@ -1266,55 +1541,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } @@ -1333,17 +1575,58 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); @@ -1359,10 +1642,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BList.java deleted file mode 100644 index 7d030d0..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BList.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1095BListItem; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1095BList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1095BList { - public static final String SERIALIZED_NAME_FORMS = "forms"; - @SerializedName(SERIALIZED_NAME_FORMS) - private List forms; - - public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; - @SerializedName(SERIALIZED_NAME_FORM_TYPE) - private String formType; - - public Form1095BList() { - } - - public Form1095BList forms(List forms) { - this.forms = forms; - return this; - } - - public Form1095BList addFormsItem(Form1095BListItem formsItem) { - if (this.forms == null) { - this.forms = new ArrayList<>(); - } - this.forms.add(formsItem); - return this; - } - - /** - * Get forms - * @return forms - */ - @javax.annotation.Nullable - public List getForms() { - return forms; - } - - public void setForms(List forms) { - this.forms = forms; - } - - - public Form1095BList formType(String formType) { - this.formType = formType; - return this; - } - - /** - * Get formType - * @return formType - */ - @javax.annotation.Nullable - public String getFormType() { - return formType; - } - - public void setFormType(String formType) { - this.formType = formType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1095BList form1095BList = (Form1095BList) o; - return Objects.equals(this.forms, form1095BList.forms) && - Objects.equals(this.formType, form1095BList.formType); - } - - @Override - public int hashCode() { - return Objects.hash(forms, formType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1095BList {\n"); - sb.append(" forms: ").append(toIndentedString(forms)).append("\n"); - sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("formType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1095BList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1095BList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1095BList is not found in the empty JSON string", Form1095BList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1095BList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095BList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("forms") != null && !jsonObj.get("forms").isJsonNull()) { - JsonArray jsonArrayforms = jsonObj.getAsJsonArray("forms"); - if (jsonArrayforms != null) { - // ensure the json data is an array - if (!jsonObj.get("forms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `forms` to be an array in the JSON string but got `%s`", jsonObj.get("forms").toString())); - } - - // validate the optional field `forms` (array) - for (int i = 0; i < jsonArrayforms.size(); i++) { - Form1095BListItem.validateJsonElement(jsonArrayforms.get(i)); - }; - } - } - if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1095BList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1095BList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1095BList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1095BList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1095BList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1095BList given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1095BList - * @throws IOException if the JSON string is invalid with respect to Form1095BList - */ - public static Form1095BList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1095BList.class); - } - - /** - * Convert an instance of Form1095BList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItem.java deleted file mode 100644 index 708a73d..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItem.java +++ /dev/null @@ -1,1240 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualRequest; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1095BListItem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1095BListItem { - public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME) - private String employeeFirstName; - - public static final String SERIALIZED_NAME_EMPLOYEE_MIDDLE_NAME = "employeeMiddleName"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_MIDDLE_NAME) - private String employeeMiddleName; - - public static final String SERIALIZED_NAME_EMPLOYEE_LAST_NAME = "employeeLastName"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_LAST_NAME) - private String employeeLastName; - - public static final String SERIALIZED_NAME_EMPLOYEE_NAME_SUFFIX = "employeeNameSuffix"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_NAME_SUFFIX) - private String employeeNameSuffix; - - public static final String SERIALIZED_NAME_EMPLOYEE_DATE_OF_BIRTH = "employeeDateOfBirth"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_DATE_OF_BIRTH) - private OffsetDateTime employeeDateOfBirth; - - /** - * Origin of health coverage code - */ - @JsonAdapter(OriginOfHealthCoverageCodeEnum.Adapter.class) - public enum OriginOfHealthCoverageCodeEnum { - A("A"), - - B("B"), - - C("C"), - - D("D"), - - E("E"), - - F("F"), - - G("G"); - - private String value; - - OriginOfHealthCoverageCodeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OriginOfHealthCoverageCodeEnum fromValue(String value) { - for (OriginOfHealthCoverageCodeEnum b : OriginOfHealthCoverageCodeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OriginOfHealthCoverageCodeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OriginOfHealthCoverageCodeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OriginOfHealthCoverageCodeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OriginOfHealthCoverageCodeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE = "originOfHealthCoverageCode"; - @SerializedName(SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE) - private OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode; - - public static final String SERIALIZED_NAME_COVERED_INDIVIDUALS = "coveredIndividuals"; - @SerializedName(SERIALIZED_NAME_COVERED_INDIVIDUALS) - private List coveredIndividuals; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1095BListItem() { - } - - public Form1095BListItem employeeFirstName(String employeeFirstName) { - this.employeeFirstName = employeeFirstName; - return this; - } - - /** - * Employee's first name - * @return employeeFirstName - */ - @javax.annotation.Nullable - public String getEmployeeFirstName() { - return employeeFirstName; - } - - public void setEmployeeFirstName(String employeeFirstName) { - this.employeeFirstName = employeeFirstName; - } - - - public Form1095BListItem employeeMiddleName(String employeeMiddleName) { - this.employeeMiddleName = employeeMiddleName; - return this; - } - - /** - * Employee's middle name - * @return employeeMiddleName - */ - @javax.annotation.Nullable - public String getEmployeeMiddleName() { - return employeeMiddleName; - } - - public void setEmployeeMiddleName(String employeeMiddleName) { - this.employeeMiddleName = employeeMiddleName; - } - - - public Form1095BListItem employeeLastName(String employeeLastName) { - this.employeeLastName = employeeLastName; - return this; - } - - /** - * Employee's last name - * @return employeeLastName - */ - @javax.annotation.Nullable - public String getEmployeeLastName() { - return employeeLastName; - } - - public void setEmployeeLastName(String employeeLastName) { - this.employeeLastName = employeeLastName; - } - - - public Form1095BListItem employeeNameSuffix(String employeeNameSuffix) { - this.employeeNameSuffix = employeeNameSuffix; - return this; - } - - /** - * Employee's name suffix - * @return employeeNameSuffix - */ - @javax.annotation.Nullable - public String getEmployeeNameSuffix() { - return employeeNameSuffix; - } - - public void setEmployeeNameSuffix(String employeeNameSuffix) { - this.employeeNameSuffix = employeeNameSuffix; - } - - - public Form1095BListItem employeeDateOfBirth(OffsetDateTime employeeDateOfBirth) { - this.employeeDateOfBirth = employeeDateOfBirth; - return this; - } - - /** - * Employee's date of birth - * @return employeeDateOfBirth - */ - @javax.annotation.Nullable - public OffsetDateTime getEmployeeDateOfBirth() { - return employeeDateOfBirth; - } - - public void setEmployeeDateOfBirth(OffsetDateTime employeeDateOfBirth) { - this.employeeDateOfBirth = employeeDateOfBirth; - } - - - public Form1095BListItem originOfHealthCoverageCode(OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode) { - this.originOfHealthCoverageCode = originOfHealthCoverageCode; - return this; - } - - /** - * Origin of health coverage code - * @return originOfHealthCoverageCode - */ - @javax.annotation.Nullable - public OriginOfHealthCoverageCodeEnum getOriginOfHealthCoverageCode() { - return originOfHealthCoverageCode; - } - - public void setOriginOfHealthCoverageCode(OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode) { - this.originOfHealthCoverageCode = originOfHealthCoverageCode; - } - - - public Form1095BListItem coveredIndividuals(List coveredIndividuals) { - this.coveredIndividuals = coveredIndividuals; - return this; - } - - public Form1095BListItem addCoveredIndividualsItem(CoveredIndividualRequest coveredIndividualsItem) { - if (this.coveredIndividuals == null) { - this.coveredIndividuals = new ArrayList<>(); - } - this.coveredIndividuals.add(coveredIndividualsItem); - return this; - } - - /** - * Covered individuals information - * @return coveredIndividuals - */ - @javax.annotation.Nullable - public List getCoveredIndividuals() { - return coveredIndividuals; - } - - public void setCoveredIndividuals(List coveredIndividuals) { - this.coveredIndividuals = coveredIndividuals; - } - - - public Form1095BListItem issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1095BListItem referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1095BListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1095BListItem recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1095BListItem tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1095BListItem recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1095BListItem address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1095BListItem address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1095BListItem city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1095BListItem state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1095BListItem zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1095BListItem email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1095BListItem accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1095BListItem officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1095BListItem nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1095BListItem countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1095BListItem federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1095BListItem postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1095BListItem stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1095BListItem tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1095BListItem noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1095BListItem secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1095BListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1095BListItem addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1095BListItem stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1095BListItem form1095BListItem = (Form1095BListItem) o; - return Objects.equals(this.employeeFirstName, form1095BListItem.employeeFirstName) && - Objects.equals(this.employeeMiddleName, form1095BListItem.employeeMiddleName) && - Objects.equals(this.employeeLastName, form1095BListItem.employeeLastName) && - Objects.equals(this.employeeNameSuffix, form1095BListItem.employeeNameSuffix) && - Objects.equals(this.employeeDateOfBirth, form1095BListItem.employeeDateOfBirth) && - Objects.equals(this.originOfHealthCoverageCode, form1095BListItem.originOfHealthCoverageCode) && - Objects.equals(this.coveredIndividuals, form1095BListItem.coveredIndividuals) && - Objects.equals(this.issuerId, form1095BListItem.issuerId) && - Objects.equals(this.referenceId, form1095BListItem.referenceId) && - Objects.equals(this.recipientTin, form1095BListItem.recipientTin) && - Objects.equals(this.recipientName, form1095BListItem.recipientName) && - Objects.equals(this.tinType, form1095BListItem.tinType) && - Objects.equals(this.recipientSecondName, form1095BListItem.recipientSecondName) && - Objects.equals(this.address, form1095BListItem.address) && - Objects.equals(this.address2, form1095BListItem.address2) && - Objects.equals(this.city, form1095BListItem.city) && - Objects.equals(this.state, form1095BListItem.state) && - Objects.equals(this.zip, form1095BListItem.zip) && - Objects.equals(this.email, form1095BListItem.email) && - Objects.equals(this.accountNumber, form1095BListItem.accountNumber) && - Objects.equals(this.officeCode, form1095BListItem.officeCode) && - Objects.equals(this.nonUsProvince, form1095BListItem.nonUsProvince) && - Objects.equals(this.countryCode, form1095BListItem.countryCode) && - Objects.equals(this.federalEFile, form1095BListItem.federalEFile) && - Objects.equals(this.postalMail, form1095BListItem.postalMail) && - Objects.equals(this.stateEFile, form1095BListItem.stateEFile) && - Objects.equals(this.tinMatch, form1095BListItem.tinMatch) && - Objects.equals(this.noTin, form1095BListItem.noTin) && - Objects.equals(this.secondTinNotice, form1095BListItem.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, form1095BListItem.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, form1095BListItem.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1095BListItem.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1095BListItem {\n"); - sb.append(" employeeFirstName: ").append(toIndentedString(employeeFirstName)).append("\n"); - sb.append(" employeeMiddleName: ").append(toIndentedString(employeeMiddleName)).append("\n"); - sb.append(" employeeLastName: ").append(toIndentedString(employeeLastName)).append("\n"); - sb.append(" employeeNameSuffix: ").append(toIndentedString(employeeNameSuffix)).append("\n"); - sb.append(" employeeDateOfBirth: ").append(toIndentedString(employeeDateOfBirth)).append("\n"); - sb.append(" originOfHealthCoverageCode: ").append(toIndentedString(originOfHealthCoverageCode)).append("\n"); - sb.append(" coveredIndividuals: ").append(toIndentedString(coveredIndividuals)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1095BListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1095BListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1095BListItem is not found in the empty JSON string", Form1095BListItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1095BListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095BListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("employeeFirstName") != null && !jsonObj.get("employeeFirstName").isJsonNull()) && !jsonObj.get("employeeFirstName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString())); - } - if ((jsonObj.get("employeeMiddleName") != null && !jsonObj.get("employeeMiddleName").isJsonNull()) && !jsonObj.get("employeeMiddleName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeMiddleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeMiddleName").toString())); - } - if ((jsonObj.get("employeeLastName") != null && !jsonObj.get("employeeLastName").isJsonNull()) && !jsonObj.get("employeeLastName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeLastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeLastName").toString())); - } - if ((jsonObj.get("employeeNameSuffix") != null && !jsonObj.get("employeeNameSuffix").isJsonNull()) && !jsonObj.get("employeeNameSuffix").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeNameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeNameSuffix").toString())); - } - if ((jsonObj.get("originOfHealthCoverageCode") != null && !jsonObj.get("originOfHealthCoverageCode").isJsonNull()) && !jsonObj.get("originOfHealthCoverageCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `originOfHealthCoverageCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originOfHealthCoverageCode").toString())); - } - // validate the optional field `originOfHealthCoverageCode` - if (jsonObj.get("originOfHealthCoverageCode") != null && !jsonObj.get("originOfHealthCoverageCode").isJsonNull()) { - OriginOfHealthCoverageCodeEnum.validateJsonElement(jsonObj.get("originOfHealthCoverageCode")); - } - if (jsonObj.get("coveredIndividuals") != null && !jsonObj.get("coveredIndividuals").isJsonNull()) { - JsonArray jsonArraycoveredIndividuals = jsonObj.getAsJsonArray("coveredIndividuals"); - if (jsonArraycoveredIndividuals != null) { - // ensure the json data is an array - if (!jsonObj.get("coveredIndividuals").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `coveredIndividuals` to be an array in the JSON string but got `%s`", jsonObj.get("coveredIndividuals").toString())); - } - - // validate the optional field `coveredIndividuals` (array) - for (int i = 0; i < jsonArraycoveredIndividuals.size(); i++) { - CoveredIndividualRequest.validateJsonElement(jsonArraycoveredIndividuals.get(i)); - }; - } - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1095BListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1095BListItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1095BListItem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1095BListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1095BListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1095BListItem - * @throws IOException if the JSON string is invalid with respect to Form1095BListItem - */ - public static Form1095BListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1095BListItem.class); - } - - /** - * Convert an instance of Form1095BListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItemResponse.java deleted file mode 100644 index 8990967..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItemResponse.java +++ /dev/null @@ -1,1361 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualReferenceResponse; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1095BListItemResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1095BListItemResponse { - public static final String SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE = "originOfHealthCoverageCode"; - @SerializedName(SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE) - private String originOfHealthCoverageCode; - - public static final String SERIALIZED_NAME_COVERED_INDIVIDUALS = "coveredIndividuals"; - @SerializedName(SERIALIZED_NAME_COVERED_INDIVIDUALS) - private List coveredIndividuals; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - public Form1095BListItemResponse() { - } - - public Form1095BListItemResponse( - String id, - StatusDetail federalEfileStatus, - List stateEfileStatus, - StatusDetail postalMailStatus, - StatusDetail tinMatchStatus, - StatusDetail addressVerificationStatus, - StatusDetail eDeliveryStatus, - List validationErrors, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.id = id; - this.federalEfileStatus = federalEfileStatus; - this.stateEfileStatus = stateEfileStatus; - this.postalMailStatus = postalMailStatus; - this.tinMatchStatus = tinMatchStatus; - this.addressVerificationStatus = addressVerificationStatus; - this.eDeliveryStatus = eDeliveryStatus; - this.validationErrors = validationErrors; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - public Form1095BListItemResponse originOfHealthCoverageCode(String originOfHealthCoverageCode) { - this.originOfHealthCoverageCode = originOfHealthCoverageCode; - return this; - } - - /** - * Origin of health coverage code - * @return originOfHealthCoverageCode - */ - @javax.annotation.Nullable - public String getOriginOfHealthCoverageCode() { - return originOfHealthCoverageCode; - } - - public void setOriginOfHealthCoverageCode(String originOfHealthCoverageCode) { - this.originOfHealthCoverageCode = originOfHealthCoverageCode; - } - - - public Form1095BListItemResponse coveredIndividuals(List coveredIndividuals) { - this.coveredIndividuals = coveredIndividuals; - return this; - } - - public Form1095BListItemResponse addCoveredIndividualsItem(CoveredIndividualReferenceResponse coveredIndividualsItem) { - if (this.coveredIndividuals == null) { - this.coveredIndividuals = new ArrayList<>(); - } - this.coveredIndividuals.add(coveredIndividualsItem); - return this; - } - - /** - * Covered individuals information - * @return coveredIndividuals - */ - @javax.annotation.Nullable - public List getCoveredIndividuals() { - return coveredIndividuals; - } - - public void setCoveredIndividuals(List coveredIndividuals) { - this.coveredIndividuals = coveredIndividuals; - } - - - /** - * ID of the form - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - - public Form1095BListItemResponse type(String type) { - this.type = type; - return this; - } - - /** - * Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public Form1095BListItemResponse issuerId(Integer issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nonnull - public Integer getIssuerId() { - return issuerId; - } - - public void setIssuerId(Integer issuerId) { - this.issuerId = issuerId; - } - - - public Form1095BListItemResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1095BListItemResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1095BListItemResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1095BListItemResponse federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Boolean indicating that federal e-filing has been scheduled for this form - * @return federalEfile - */ - @javax.annotation.Nonnull - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - /** - * Federal e-file status - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - - - public Form1095BListItemResponse stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - return this; - } - - /** - * Boolean indicating that state e-filing has been scheduled for this form - * @return stateEfile - */ - @javax.annotation.Nonnull - public Boolean getStateEfile() { - return stateEfile; - } - - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - } - - - /** - * State e-file status - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - - - public Form1095BListItemResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient has been scheduled for this form - * @return postalMail - */ - @javax.annotation.Nonnull - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - /** - * Postal mail to recipient status - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - - - public Form1095BListItemResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching has been scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nonnull - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - /** - * TIN Match status - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - - - public Form1095BListItemResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification has been scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nonnull - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - /** - * Address verification status - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - - - /** - * EDelivery status - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - - - public Form1095BListItemResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1095BListItemResponse email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1095BListItemResponse tinType(String tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public String getTinType() { - return tinType; - } - - public void setTinType(String tinType) { - this.tinType = tinType; - } - - - public Form1095BListItemResponse tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Recipient Tax ID Number - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public Form1095BListItemResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1095BListItemResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second Tin Notice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1095BListItemResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1095BListItemResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1095BListItemResponse address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1095BListItemResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1095BListItemResponse city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1095BListItemResponse state(String state) { - this.state = state; - return this; - } - - /** - * US state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1095BListItemResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1095BListItemResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1095BListItemResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1095BListItemResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account Number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1095BListItemResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office Code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1095BListItemResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - /** - * Validation errors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - - - /** - * Creation time - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - /** - * Update time - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - public Form1095BListItemResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1095BListItemResponse form1095BListItemResponse = (Form1095BListItemResponse) o; - return Objects.equals(this.originOfHealthCoverageCode, form1095BListItemResponse.originOfHealthCoverageCode) && - Objects.equals(this.coveredIndividuals, form1095BListItemResponse.coveredIndividuals) && - Objects.equals(this.id, form1095BListItemResponse.id) && - Objects.equals(this.type, form1095BListItemResponse.type) && - Objects.equals(this.issuerId, form1095BListItemResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1095BListItemResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1095BListItemResponse.issuerTin) && - Objects.equals(this.taxYear, form1095BListItemResponse.taxYear) && - Objects.equals(this.federalEfile, form1095BListItemResponse.federalEfile) && - Objects.equals(this.federalEfileStatus, form1095BListItemResponse.federalEfileStatus) && - Objects.equals(this.stateEfile, form1095BListItemResponse.stateEfile) && - Objects.equals(this.stateEfileStatus, form1095BListItemResponse.stateEfileStatus) && - Objects.equals(this.postalMail, form1095BListItemResponse.postalMail) && - Objects.equals(this.postalMailStatus, form1095BListItemResponse.postalMailStatus) && - Objects.equals(this.tinMatch, form1095BListItemResponse.tinMatch) && - Objects.equals(this.tinMatchStatus, form1095BListItemResponse.tinMatchStatus) && - Objects.equals(this.addressVerification, form1095BListItemResponse.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1095BListItemResponse.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1095BListItemResponse.eDeliveryStatus) && - Objects.equals(this.referenceId, form1095BListItemResponse.referenceId) && - Objects.equals(this.email, form1095BListItemResponse.email) && - Objects.equals(this.tinType, form1095BListItemResponse.tinType) && - Objects.equals(this.tin, form1095BListItemResponse.tin) && - Objects.equals(this.noTin, form1095BListItemResponse.noTin) && - Objects.equals(this.secondTinNotice, form1095BListItemResponse.secondTinNotice) && - Objects.equals(this.recipientName, form1095BListItemResponse.recipientName) && - Objects.equals(this.recipientSecondName, form1095BListItemResponse.recipientSecondName) && - Objects.equals(this.address, form1095BListItemResponse.address) && - Objects.equals(this.address2, form1095BListItemResponse.address2) && - Objects.equals(this.city, form1095BListItemResponse.city) && - Objects.equals(this.state, form1095BListItemResponse.state) && - Objects.equals(this.zip, form1095BListItemResponse.zip) && - Objects.equals(this.nonUsProvince, form1095BListItemResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1095BListItemResponse.countryCode) && - Objects.equals(this.accountNumber, form1095BListItemResponse.accountNumber) && - Objects.equals(this.officeCode, form1095BListItemResponse.officeCode) && - Objects.equals(this.fatcaFilingRequirement, form1095BListItemResponse.fatcaFilingRequirement) && - Objects.equals(this.validationErrors, form1095BListItemResponse.validationErrors) && - Objects.equals(this.createdAt, form1095BListItemResponse.createdAt) && - Objects.equals(this.updatedAt, form1095BListItemResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1095BListItemResponse.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(originOfHealthCoverageCode, coveredIndividuals, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, fatcaFilingRequirement, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1095BListItemResponse {\n"); - sb.append(" originOfHealthCoverageCode: ").append(toIndentedString(originOfHealthCoverageCode)).append("\n"); - sb.append(" coveredIndividuals: ").append(toIndentedString(coveredIndividuals)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("recipientName"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("validationErrors"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("issuerId"); - openapiRequiredFields.add("federalEfile"); - openapiRequiredFields.add("stateEfile"); - openapiRequiredFields.add("postalMail"); - openapiRequiredFields.add("tinMatch"); - openapiRequiredFields.add("addressVerification"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1095BListItemResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1095BListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1095BListItemResponse is not found in the empty JSON string", Form1095BListItemResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1095BListItemResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095BListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1095BListItemResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("originOfHealthCoverageCode") != null && !jsonObj.get("originOfHealthCoverageCode").isJsonNull()) && !jsonObj.get("originOfHealthCoverageCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `originOfHealthCoverageCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originOfHealthCoverageCode").toString())); - } - if (jsonObj.get("coveredIndividuals") != null && !jsonObj.get("coveredIndividuals").isJsonNull()) { - JsonArray jsonArraycoveredIndividuals = jsonObj.getAsJsonArray("coveredIndividuals"); - if (jsonArraycoveredIndividuals != null) { - // ensure the json data is an array - if (!jsonObj.get("coveredIndividuals").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `coveredIndividuals` to be an array in the JSON string but got `%s`", jsonObj.get("coveredIndividuals").toString())); - } - - // validate the optional field `coveredIndividuals` (array) - for (int i = 0; i < jsonArraycoveredIndividuals.size(); i++) { - CoveredIndividualReferenceResponse.validateJsonElement(jsonArraycoveredIndividuals.get(i)); - }; - } - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1095BListItemResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1095BListItemResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItemResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1095BListItemResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1095BListItemResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1095BListItemResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1095BListItemResponse - * @throws IOException if the JSON string is invalid with respect to Form1095BListItemResponse - */ - public static Form1095BListItemResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1095BListItemResponse.class); - } - - /** - * Convert an instance of Form1095BListItemResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BRequest.java deleted file mode 100644 index 6696319..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BRequest.java +++ /dev/null @@ -1,1339 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualRequest; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1095BRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1095BRequest { - public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME) - private String employeeFirstName; - - public static final String SERIALIZED_NAME_EMPLOYEE_MIDDLE_NAME = "employeeMiddleName"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_MIDDLE_NAME) - private String employeeMiddleName; - - public static final String SERIALIZED_NAME_EMPLOYEE_LAST_NAME = "employeeLastName"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_LAST_NAME) - private String employeeLastName; - - public static final String SERIALIZED_NAME_EMPLOYEE_NAME_SUFFIX = "employeeNameSuffix"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_NAME_SUFFIX) - private String employeeNameSuffix; - - public static final String SERIALIZED_NAME_EMPLOYEE_DATE_OF_BIRTH = "employeeDateOfBirth"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_DATE_OF_BIRTH) - private OffsetDateTime employeeDateOfBirth; - - /** - * Origin of health coverage code - */ - @JsonAdapter(OriginOfHealthCoverageCodeEnum.Adapter.class) - public enum OriginOfHealthCoverageCodeEnum { - A("A"), - - B("B"), - - C("C"), - - D("D"), - - E("E"), - - F("F"), - - G("G"); - - private String value; - - OriginOfHealthCoverageCodeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static OriginOfHealthCoverageCodeEnum fromValue(String value) { - for (OriginOfHealthCoverageCodeEnum b : OriginOfHealthCoverageCodeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final OriginOfHealthCoverageCodeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public OriginOfHealthCoverageCodeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return OriginOfHealthCoverageCodeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - OriginOfHealthCoverageCodeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE = "originOfHealthCoverageCode"; - @SerializedName(SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE) - private OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode; - - public static final String SERIALIZED_NAME_COVERED_INDIVIDUALS = "coveredIndividuals"; - @SerializedName(SERIALIZED_NAME_COVERED_INDIVIDUALS) - private List coveredIndividuals; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1095BRequest() { - } - - public Form1095BRequest employeeFirstName(String employeeFirstName) { - this.employeeFirstName = employeeFirstName; - return this; - } - - /** - * Employee's first name - * @return employeeFirstName - */ - @javax.annotation.Nullable - public String getEmployeeFirstName() { - return employeeFirstName; - } - - public void setEmployeeFirstName(String employeeFirstName) { - this.employeeFirstName = employeeFirstName; - } - - - public Form1095BRequest employeeMiddleName(String employeeMiddleName) { - this.employeeMiddleName = employeeMiddleName; - return this; - } - - /** - * Employee's middle name - * @return employeeMiddleName - */ - @javax.annotation.Nullable - public String getEmployeeMiddleName() { - return employeeMiddleName; - } - - public void setEmployeeMiddleName(String employeeMiddleName) { - this.employeeMiddleName = employeeMiddleName; - } - - - public Form1095BRequest employeeLastName(String employeeLastName) { - this.employeeLastName = employeeLastName; - return this; - } - - /** - * Employee's last name - * @return employeeLastName - */ - @javax.annotation.Nullable - public String getEmployeeLastName() { - return employeeLastName; - } - - public void setEmployeeLastName(String employeeLastName) { - this.employeeLastName = employeeLastName; - } - - - public Form1095BRequest employeeNameSuffix(String employeeNameSuffix) { - this.employeeNameSuffix = employeeNameSuffix; - return this; - } - - /** - * Employee's name suffix - * @return employeeNameSuffix - */ - @javax.annotation.Nullable - public String getEmployeeNameSuffix() { - return employeeNameSuffix; - } - - public void setEmployeeNameSuffix(String employeeNameSuffix) { - this.employeeNameSuffix = employeeNameSuffix; - } - - - public Form1095BRequest employeeDateOfBirth(OffsetDateTime employeeDateOfBirth) { - this.employeeDateOfBirth = employeeDateOfBirth; - return this; - } - - /** - * Employee's date of birth - * @return employeeDateOfBirth - */ - @javax.annotation.Nullable - public OffsetDateTime getEmployeeDateOfBirth() { - return employeeDateOfBirth; - } - - public void setEmployeeDateOfBirth(OffsetDateTime employeeDateOfBirth) { - this.employeeDateOfBirth = employeeDateOfBirth; - } - - - public Form1095BRequest originOfHealthCoverageCode(OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode) { - this.originOfHealthCoverageCode = originOfHealthCoverageCode; - return this; - } - - /** - * Origin of health coverage code - * @return originOfHealthCoverageCode - */ - @javax.annotation.Nullable - public OriginOfHealthCoverageCodeEnum getOriginOfHealthCoverageCode() { - return originOfHealthCoverageCode; - } - - public void setOriginOfHealthCoverageCode(OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode) { - this.originOfHealthCoverageCode = originOfHealthCoverageCode; - } - - - public Form1095BRequest coveredIndividuals(List coveredIndividuals) { - this.coveredIndividuals = coveredIndividuals; - return this; - } - - public Form1095BRequest addCoveredIndividualsItem(CoveredIndividualRequest coveredIndividualsItem) { - if (this.coveredIndividuals == null) { - this.coveredIndividuals = new ArrayList<>(); - } - this.coveredIndividuals.add(coveredIndividualsItem); - return this; - } - - /** - * Covered individuals information - * @return coveredIndividuals - */ - @javax.annotation.Nullable - public List getCoveredIndividuals() { - return coveredIndividuals; - } - - public void setCoveredIndividuals(List coveredIndividuals) { - this.coveredIndividuals = coveredIndividuals; - } - - - public Form1095BRequest type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Form1095BRequest issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1095BRequest referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1095BRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1095BRequest recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1095BRequest tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1095BRequest recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1095BRequest address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1095BRequest address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1095BRequest city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1095BRequest state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1095BRequest zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1095BRequest email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1095BRequest accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1095BRequest officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1095BRequest nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1095BRequest countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1095BRequest federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1095BRequest postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1095BRequest stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1095BRequest tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1095BRequest noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1095BRequest secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1095BRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1095BRequest addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1095BRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1095BRequest form1095BRequest = (Form1095BRequest) o; - return Objects.equals(this.employeeFirstName, form1095BRequest.employeeFirstName) && - Objects.equals(this.employeeMiddleName, form1095BRequest.employeeMiddleName) && - Objects.equals(this.employeeLastName, form1095BRequest.employeeLastName) && - Objects.equals(this.employeeNameSuffix, form1095BRequest.employeeNameSuffix) && - Objects.equals(this.employeeDateOfBirth, form1095BRequest.employeeDateOfBirth) && - Objects.equals(this.originOfHealthCoverageCode, form1095BRequest.originOfHealthCoverageCode) && - Objects.equals(this.coveredIndividuals, form1095BRequest.coveredIndividuals) && - Objects.equals(this.type, form1095BRequest.type) && - Objects.equals(this.issuerId, form1095BRequest.issuerId) && - Objects.equals(this.referenceId, form1095BRequest.referenceId) && - Objects.equals(this.recipientTin, form1095BRequest.recipientTin) && - Objects.equals(this.recipientName, form1095BRequest.recipientName) && - Objects.equals(this.tinType, form1095BRequest.tinType) && - Objects.equals(this.recipientSecondName, form1095BRequest.recipientSecondName) && - Objects.equals(this.address, form1095BRequest.address) && - Objects.equals(this.address2, form1095BRequest.address2) && - Objects.equals(this.city, form1095BRequest.city) && - Objects.equals(this.state, form1095BRequest.state) && - Objects.equals(this.zip, form1095BRequest.zip) && - Objects.equals(this.email, form1095BRequest.email) && - Objects.equals(this.accountNumber, form1095BRequest.accountNumber) && - Objects.equals(this.officeCode, form1095BRequest.officeCode) && - Objects.equals(this.nonUsProvince, form1095BRequest.nonUsProvince) && - Objects.equals(this.countryCode, form1095BRequest.countryCode) && - Objects.equals(this.federalEFile, form1095BRequest.federalEFile) && - Objects.equals(this.postalMail, form1095BRequest.postalMail) && - Objects.equals(this.stateEFile, form1095BRequest.stateEFile) && - Objects.equals(this.tinMatch, form1095BRequest.tinMatch) && - Objects.equals(this.noTin, form1095BRequest.noTin) && - Objects.equals(this.secondTinNotice, form1095BRequest.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, form1095BRequest.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, form1095BRequest.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1095BRequest.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1095BRequest {\n"); - sb.append(" employeeFirstName: ").append(toIndentedString(employeeFirstName)).append("\n"); - sb.append(" employeeMiddleName: ").append(toIndentedString(employeeMiddleName)).append("\n"); - sb.append(" employeeLastName: ").append(toIndentedString(employeeLastName)).append("\n"); - sb.append(" employeeNameSuffix: ").append(toIndentedString(employeeNameSuffix)).append("\n"); - sb.append(" employeeDateOfBirth: ").append(toIndentedString(employeeDateOfBirth)).append("\n"); - sb.append(" originOfHealthCoverageCode: ").append(toIndentedString(originOfHealthCoverageCode)).append("\n"); - sb.append(" coveredIndividuals: ").append(toIndentedString(coveredIndividuals)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1095BRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1095BRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1095BRequest is not found in the empty JSON string", Form1095BRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1095BRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095BRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("employeeFirstName") != null && !jsonObj.get("employeeFirstName").isJsonNull()) && !jsonObj.get("employeeFirstName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString())); - } - if ((jsonObj.get("employeeMiddleName") != null && !jsonObj.get("employeeMiddleName").isJsonNull()) && !jsonObj.get("employeeMiddleName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeMiddleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeMiddleName").toString())); - } - if ((jsonObj.get("employeeLastName") != null && !jsonObj.get("employeeLastName").isJsonNull()) && !jsonObj.get("employeeLastName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeLastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeLastName").toString())); - } - if ((jsonObj.get("employeeNameSuffix") != null && !jsonObj.get("employeeNameSuffix").isJsonNull()) && !jsonObj.get("employeeNameSuffix").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeNameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeNameSuffix").toString())); - } - if ((jsonObj.get("originOfHealthCoverageCode") != null && !jsonObj.get("originOfHealthCoverageCode").isJsonNull()) && !jsonObj.get("originOfHealthCoverageCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `originOfHealthCoverageCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originOfHealthCoverageCode").toString())); - } - // validate the optional field `originOfHealthCoverageCode` - if (jsonObj.get("originOfHealthCoverageCode") != null && !jsonObj.get("originOfHealthCoverageCode").isJsonNull()) { - OriginOfHealthCoverageCodeEnum.validateJsonElement(jsonObj.get("originOfHealthCoverageCode")); - } - if (jsonObj.get("coveredIndividuals") != null && !jsonObj.get("coveredIndividuals").isJsonNull()) { - JsonArray jsonArraycoveredIndividuals = jsonObj.getAsJsonArray("coveredIndividuals"); - if (jsonArraycoveredIndividuals != null) { - // ensure the json data is an array - if (!jsonObj.get("coveredIndividuals").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `coveredIndividuals` to be an array in the JSON string but got `%s`", jsonObj.get("coveredIndividuals").toString())); - } - - // validate the optional field `coveredIndividuals` (array) - for (int i = 0; i < jsonArraycoveredIndividuals.size(); i++) { - CoveredIndividualRequest.validateJsonElement(jsonArraycoveredIndividuals.get(i)); - }; - } - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1095BRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1095BRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1095BRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1095BRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1095BRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1095BRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1095BRequest - * @throws IOException if the JSON string is invalid with respect to Form1095BRequest - */ - public static Form1095BRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1095BRequest.class); - } - - /** - * Convert an instance of Form1095BRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java similarity index 66% rename from src/main/java/Avalara/SDK/model/A1099/V2/Form1095BResponse.java rename to src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java index fb0e600..6066c24 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java @@ -20,17 +20,19 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualRequest; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; +import Avalara.SDK.model.A1099.V2.CoveredIndividual; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.OfferAndCoverage; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -62,10 +64,10 @@ import Avalara.SDK.JSON; /** - * Form1095BResponse + * Form 1095-C: Employer-Provided Health Insurance Offer and Coverage */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1095BResponse { +public class Form1095C { public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName"; @SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME) private String employeeFirstName; @@ -82,32 +84,44 @@ public class Form1095BResponse { @SerializedName(SERIALIZED_NAME_EMPLOYEE_NAME_SUFFIX) private String employeeNameSuffix; - public static final String SERIALIZED_NAME_EMPLOYEE_DATE_OF_BIRTH = "employeeDateOfBirth"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_DATE_OF_BIRTH) - private OffsetDateTime employeeDateOfBirth; + public static final String SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH = "recipientDateOfBirth"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH) + private LocalDate recipientDateOfBirth; /** - * Gets or Sets originOfHealthCoverageCode + * Plan start month. The calendar month during which the plan year begins of the health plan in which the employee is offered coverage (or would be offered coverage if the employee were eligible to participate in the plan). Available values: - 00: None - 01: January - 02: February - 03: March - 04: April - 05: May - 06: June - 07: July - 08: August - 09: September - 10: October - 11: November - 12: December */ - @JsonAdapter(OriginOfHealthCoverageCodeEnum.Adapter.class) - public enum OriginOfHealthCoverageCodeEnum { - A("A"), + @JsonAdapter(PlanStartMonthEnum.Adapter.class) + public enum PlanStartMonthEnum { + _00("00"), - B("B"), + _01("01"), - C("C"), + _02("02"), - D("D"), + _03("03"), - E("E"), + _04("04"), - F("F"), + _05("05"), - G("G"); + _06("06"), + + _07("07"), + + _08("08"), + + _09("09"), + + _10("10"), + + _11("11"), + + _12("12"); private String value; - OriginOfHealthCoverageCodeEnum(String value) { + PlanStartMonthEnum(String value) { this.value = value; } @@ -120,44 +134,52 @@ public String toString() { return String.valueOf(value); } - public static OriginOfHealthCoverageCodeEnum fromValue(String value) { - for (OriginOfHealthCoverageCodeEnum b : OriginOfHealthCoverageCodeEnum.values()) { + public static PlanStartMonthEnum fromValue(String value) { + for (PlanStartMonthEnum b : PlanStartMonthEnum.values()) { if (b.value.equals(value)) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } - public static class Adapter extends TypeAdapter { + public static class Adapter extends TypeAdapter { @Override - public void write(final JsonWriter jsonWriter, final OriginOfHealthCoverageCodeEnum enumeration) throws IOException { + public void write(final JsonWriter jsonWriter, final PlanStartMonthEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override - public OriginOfHealthCoverageCodeEnum read(final JsonReader jsonReader) throws IOException { + public PlanStartMonthEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); - return OriginOfHealthCoverageCodeEnum.fromValue(value); + return PlanStartMonthEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); - OriginOfHealthCoverageCodeEnum.fromValue(value); + PlanStartMonthEnum.fromValue(value); } } - public static final String SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE = "originOfHealthCoverageCode"; - @SerializedName(SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE) - private OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode; + public static final String SERIALIZED_NAME_PLAN_START_MONTH = "planStartMonth"; + @SerializedName(SERIALIZED_NAME_PLAN_START_MONTH) + private PlanStartMonthEnum planStartMonth; + + public static final String SERIALIZED_NAME_EMPLOYER_PROVIDED_SI_COVERAGE = "employerProvidedSiCoverage"; + @SerializedName(SERIALIZED_NAME_EMPLOYER_PROVIDED_SI_COVERAGE) + private Boolean employerProvidedSiCoverage; + + public static final String SERIALIZED_NAME_OFFER_AND_COVERAGES = "offerAndCoverages"; + @SerializedName(SERIALIZED_NAME_OFFER_AND_COVERAGES) + private List offerAndCoverages; public static final String SERIALIZED_NAME_COVERED_INDIVIDUALS = "coveredIndividuals"; @SerializedName(SERIALIZED_NAME_COVERED_INDIVIDUALS) - private List coveredIndividuals; + private List coveredIndividuals; /** - * Gets or Sets type + * Form type */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { @@ -226,23 +248,45 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TYPE) private TypeEnum type; - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; + @SerializedName(SERIALIZED_NAME_ISSUER_ID) + private String issuerId; - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; + public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; + @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) + private String issuerReferenceId; + + public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; + @SerializedName(SERIALIZED_NAME_ISSUER_TIN) + private String issuerTin; + + public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; + @SerializedName(SERIALIZED_NAME_TAX_YEAR) + private Integer taxYear; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; + + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number) */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { + EMPTY("Empty"), + EIN("EIN"), SSN("SSN"), @@ -272,7 +316,7 @@ public static TinTypeEnum fromValue(String value) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } public static class Adapter extends TypeAdapter { @@ -298,38 +342,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_TYPE) private TinTypeEnum tinType; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) private String recipientSecondName; @@ -374,17 +386,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) private String countryCode; - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) private Boolean postalMail; - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; @SerializedName(SERIALIZED_NAME_TIN_MATCH) @@ -394,59 +410,89 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_NO_TIN) private Boolean noTin; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; + private Form1099StatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + private List stateEfileStatus; public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; + private Form1099StatusDetail postalMailStatus; public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; + private Form1099StatusDetail tinMatchStatus; public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; + private List validationErrors; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; - public Form1095BResponse() { + public Form1095C() { } - public Form1095BResponse( - TypeEnum type + public Form1095C( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt ) { this(); - this.type = type; + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; } - public Form1095BResponse employeeFirstName(String employeeFirstName) { + public Form1095C employeeFirstName(String employeeFirstName) { this.employeeFirstName = employeeFirstName; return this; } /** - * Get employeeFirstName + * Employee's first name * @return employeeFirstName */ @javax.annotation.Nullable @@ -459,13 +505,13 @@ public void setEmployeeFirstName(String employeeFirstName) { } - public Form1095BResponse employeeMiddleName(String employeeMiddleName) { + public Form1095C employeeMiddleName(String employeeMiddleName) { this.employeeMiddleName = employeeMiddleName; return this; } /** - * Get employeeMiddleName + * Employee's middle name * @return employeeMiddleName */ @javax.annotation.Nullable @@ -478,13 +524,13 @@ public void setEmployeeMiddleName(String employeeMiddleName) { } - public Form1095BResponse employeeLastName(String employeeLastName) { + public Form1095C employeeLastName(String employeeLastName) { this.employeeLastName = employeeLastName; return this; } /** - * Get employeeLastName + * Employee's last name * @return employeeLastName */ @javax.annotation.Nullable @@ -497,13 +543,13 @@ public void setEmployeeLastName(String employeeLastName) { } - public Form1095BResponse employeeNameSuffix(String employeeNameSuffix) { + public Form1095C employeeNameSuffix(String employeeNameSuffix) { this.employeeNameSuffix = employeeNameSuffix; return this; } /** - * Get employeeNameSuffix + * Employee's name suffix * @return employeeNameSuffix */ @javax.annotation.Nullable @@ -516,165 +562,138 @@ public void setEmployeeNameSuffix(String employeeNameSuffix) { } - public Form1095BResponse employeeDateOfBirth(OffsetDateTime employeeDateOfBirth) { - this.employeeDateOfBirth = employeeDateOfBirth; + public Form1095C recipientDateOfBirth(LocalDate recipientDateOfBirth) { + this.recipientDateOfBirth = recipientDateOfBirth; return this; } /** - * Get employeeDateOfBirth - * @return employeeDateOfBirth + * Recipient's date of birth + * @return recipientDateOfBirth */ @javax.annotation.Nullable - public OffsetDateTime getEmployeeDateOfBirth() { - return employeeDateOfBirth; + public LocalDate getRecipientDateOfBirth() { + return recipientDateOfBirth; } - public void setEmployeeDateOfBirth(OffsetDateTime employeeDateOfBirth) { - this.employeeDateOfBirth = employeeDateOfBirth; + public void setRecipientDateOfBirth(LocalDate recipientDateOfBirth) { + this.recipientDateOfBirth = recipientDateOfBirth; } - public Form1095BResponse originOfHealthCoverageCode(OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode) { - this.originOfHealthCoverageCode = originOfHealthCoverageCode; + public Form1095C planStartMonth(PlanStartMonthEnum planStartMonth) { + this.planStartMonth = planStartMonth; return this; } /** - * Get originOfHealthCoverageCode - * @return originOfHealthCoverageCode + * Plan start month. The calendar month during which the plan year begins of the health plan in which the employee is offered coverage (or would be offered coverage if the employee were eligible to participate in the plan). Available values: - 00: None - 01: January - 02: February - 03: March - 04: April - 05: May - 06: June - 07: July - 08: August - 09: September - 10: October - 11: November - 12: December + * @return planStartMonth */ @javax.annotation.Nullable - public OriginOfHealthCoverageCodeEnum getOriginOfHealthCoverageCode() { - return originOfHealthCoverageCode; + public PlanStartMonthEnum getPlanStartMonth() { + return planStartMonth; } - public void setOriginOfHealthCoverageCode(OriginOfHealthCoverageCodeEnum originOfHealthCoverageCode) { - this.originOfHealthCoverageCode = originOfHealthCoverageCode; + public void setPlanStartMonth(PlanStartMonthEnum planStartMonth) { + this.planStartMonth = planStartMonth; } - public Form1095BResponse coveredIndividuals(List coveredIndividuals) { - this.coveredIndividuals = coveredIndividuals; - return this; - } - - public Form1095BResponse addCoveredIndividualsItem(CoveredIndividualRequest coveredIndividualsItem) { - if (this.coveredIndividuals == null) { - this.coveredIndividuals = new ArrayList<>(); - } - this.coveredIndividuals.add(coveredIndividualsItem); + public Form1095C employerProvidedSiCoverage(Boolean employerProvidedSiCoverage) { + this.employerProvidedSiCoverage = employerProvidedSiCoverage; return this; } /** - * Get coveredIndividuals - * @return coveredIndividuals + * Employer provided self-insured coverage + * @return employerProvidedSiCoverage */ @javax.annotation.Nullable - public List getCoveredIndividuals() { - return coveredIndividuals; + public Boolean getEmployerProvidedSiCoverage() { + return employerProvidedSiCoverage; } - public void setCoveredIndividuals(List coveredIndividuals) { - this.coveredIndividuals = coveredIndividuals; + public void setEmployerProvidedSiCoverage(Boolean employerProvidedSiCoverage) { + this.employerProvidedSiCoverage = employerProvidedSiCoverage; } - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; + public Form1095C offerAndCoverages(List offerAndCoverages) { + this.offerAndCoverages = offerAndCoverages; + return this; } - - - public Form1095BResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; + public Form1095C addOfferAndCoveragesItem(OfferAndCoverage offerAndCoveragesItem) { + if (this.offerAndCoverages == null) { + this.offerAndCoverages = new ArrayList<>(); + } + this.offerAndCoverages.add(offerAndCoveragesItem); return this; } /** - * Get createdAt - * @return createdAt + * Offer and coverage information + * @return offerAndCoverages */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; + @javax.annotation.Nonnull + public List getOfferAndCoverages() { + return offerAndCoverages; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; + public void setOfferAndCoverages(List offerAndCoverages) { + this.offerAndCoverages = offerAndCoverages; } - public Form1095BResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; + public Form1095C coveredIndividuals(List coveredIndividuals) { + this.coveredIndividuals = coveredIndividuals; return this; } - /** - * Get updatedAt - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1095BResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; + public Form1095C addCoveredIndividualsItem(CoveredIndividual coveredIndividualsItem) { + if (this.coveredIndividuals == null) { + this.coveredIndividuals = new ArrayList<>(); + } + this.coveredIndividuals.add(coveredIndividualsItem); return this; } /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding + * Covered individuals information + * @return coveredIndividuals */ @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; + public List getCoveredIndividuals() { + return coveredIndividuals; } - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; + public void setCoveredIndividuals(List coveredIndividuals) { + this.coveredIndividuals = coveredIndividuals; } - public Form1095BResponse tinType(TinTypeEnum tinType) { - this.tinType = tinType; + public Form1095C type(TypeEnum type) { + this.type = type; return this; } /** - * Get tinType - * @return tinType + * Form type + * @return type */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; } - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; + public void setType(TypeEnum type) { + this.type = type; } - public Form1095BResponse id(String id) { - this.id = id; - return this; - } - /** - * Get id + * Form ID. Unique identifier set when the record is created. * @return id */ @javax.annotation.Nullable @@ -682,18 +701,15 @@ public String getId() { return id; } - public void setId(String id) { - this.id = id; - } - public Form1095BResponse issuerId(String issuerId) { + public Form1095C issuerId(String issuerId) { this.issuerId = issuerId; return this; } /** - * Get issuerId + * Issuer ID - only required when creating forms * @return issuerId */ @javax.annotation.Nullable @@ -706,13 +722,13 @@ public void setIssuerId(String issuerId) { } - public Form1095BResponse issuerReferenceId(String issuerReferenceId) { + public Form1095C issuerReferenceId(String issuerReferenceId) { this.issuerReferenceId = issuerReferenceId; return this; } /** - * Get issuerReferenceId + * Issuer Reference ID - only required when creating forms * @return issuerReferenceId */ @javax.annotation.Nullable @@ -725,13 +741,13 @@ public void setIssuerReferenceId(String issuerReferenceId) { } - public Form1095BResponse issuerTin(String issuerTin) { + public Form1095C issuerTin(String issuerTin) { this.issuerTin = issuerTin; return this; } /** - * Get issuerTin + * Issuer TIN - readonly * @return issuerTin */ @javax.annotation.Nullable @@ -744,13 +760,13 @@ public void setIssuerTin(String issuerTin) { } - public Form1095BResponse taxYear(Integer taxYear) { + public Form1095C taxYear(Integer taxYear) { this.taxYear = taxYear; return this; } /** - * Get taxYear + * Tax Year - only required when creating forms * @return taxYear */ @javax.annotation.Nullable @@ -763,13 +779,13 @@ public void setTaxYear(Integer taxYear) { } - public Form1095BResponse referenceId(String referenceId) { + public Form1095C referenceId(String referenceId) { this.referenceId = referenceId; return this; } /** - * Get referenceId + * Internal reference ID. Never shown to any agency or recipient. * @return referenceId */ @javax.annotation.Nullable @@ -782,13 +798,32 @@ public void setReferenceId(String referenceId) { } - public Form1095BResponse recipientName(String recipientName) { + public Form1095C tin(String tin) { + this.tin = tin; + return this; + } + + /** + * Recipient's Federal Tax Identification Number (TIN). + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public Form1095C recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Get recipientName + * Recipient name * @return recipientName */ @javax.annotation.Nullable @@ -801,32 +836,32 @@ public void setRecipientName(String recipientName) { } - public Form1095BResponse recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1095C tinType(TinTypeEnum tinType) { + this.tinType = tinType; return this; } /** - * Get recipientTin - * @return recipientTin + * Type of TIN (Tax ID Number) + * @return tinType */ @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + public TinTypeEnum getTinType() { + return tinType; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; } - public Form1095BResponse recipientSecondName(String recipientSecondName) { + public Form1095C recipientSecondName(String recipientSecondName) { this.recipientSecondName = recipientSecondName; return this; } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -839,13 +874,13 @@ public void setRecipientSecondName(String recipientSecondName) { } - public Form1095BResponse address(String address) { + public Form1095C address(String address) { this.address = address; return this; } /** - * Get address + * Address. * @return address */ @javax.annotation.Nullable @@ -858,13 +893,13 @@ public void setAddress(String address) { } - public Form1095BResponse address2(String address2) { + public Form1095C address2(String address2) { this.address2 = address2; return this; } /** - * Get address2 + * Address line 2. * @return address2 */ @javax.annotation.Nullable @@ -877,13 +912,13 @@ public void setAddress2(String address2) { } - public Form1095BResponse city(String city) { + public Form1095C city(String city) { this.city = city; return this; } /** - * Get city + * City. * @return city */ @javax.annotation.Nullable @@ -896,13 +931,13 @@ public void setCity(String city) { } - public Form1095BResponse state(String state) { + public Form1095C state(String state) { this.state = state; return this; } /** - * Get state + * Two-letter US state or Canadian province code (required for US/CA addresses). * @return state */ @javax.annotation.Nullable @@ -915,13 +950,13 @@ public void setState(String state) { } - public Form1095BResponse zip(String zip) { + public Form1095C zip(String zip) { this.zip = zip; return this; } /** - * Get zip + * ZIP/postal code. * @return zip */ @javax.annotation.Nullable @@ -934,13 +969,13 @@ public void setZip(String zip) { } - public Form1095BResponse email(String email) { + public Form1095C email(String email) { this.email = email; return this; } /** - * Get email + * Recipient's Contact email address. * @return email */ @javax.annotation.Nullable @@ -953,13 +988,13 @@ public void setEmail(String email) { } - public Form1095BResponse accountNumber(String accountNumber) { + public Form1095C accountNumber(String accountNumber) { this.accountNumber = accountNumber; return this; } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -972,13 +1007,13 @@ public void setAccountNumber(String accountNumber) { } - public Form1095BResponse officeCode(String officeCode) { + public Form1095C officeCode(String officeCode) { this.officeCode = officeCode; return this; } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -991,13 +1026,13 @@ public void setOfficeCode(String officeCode) { } - public Form1095BResponse nonUsProvince(String nonUsProvince) { + public Form1095C nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; } /** - * Get nonUsProvince + * Province or region for non-US/CA addresses. * @return nonUsProvince */ @javax.annotation.Nullable @@ -1010,13 +1045,13 @@ public void setNonUsProvince(String nonUsProvince) { } - public Form1095BResponse countryCode(String countryCode) { + public Form1095C countryCode(String countryCode) { this.countryCode = countryCode; return this; } /** - * Get countryCode + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. * @return countryCode */ @javax.annotation.Nullable @@ -1029,32 +1064,32 @@ public void setCountryCode(String countryCode) { } - public Form1095BResponse federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; + public Form1095C federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; return this; } /** - * Get federalEFile - * @return federalEFile + * Date when federal e-filing should be scheduled for this form + * @return federalEfileDate */ @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; + public LocalDate getFederalEfileDate() { + return federalEfileDate; } - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; } - public Form1095BResponse postalMail(Boolean postalMail) { + public Form1095C postalMail(Boolean postalMail) { this.postalMail = postalMail; return this; } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -1067,32 +1102,51 @@ public void setPostalMail(Boolean postalMail) { } - public Form1095BResponse stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; + public Form1095C stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; return this; } /** - * Get stateEFile - * @return stateEFile + * Date when state e-filing should be scheduled for this form + * @return stateEfileDate */ @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; + public LocalDate getStateEfileDate() { + return stateEfileDate; } - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; } - public Form1095BResponse tinMatch(Boolean tinMatch) { + public Form1095C recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; + return this; + } + + /** + * Date when recipient e-delivery should be scheduled for this form + * @return recipientEdeliveryDate + */ + @javax.annotation.Nullable + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; + } + + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; + } + + + public Form1095C tinMatch(Boolean tinMatch) { this.tinMatch = tinMatch; return this; } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -1105,13 +1159,13 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1095BResponse noTin(Boolean noTin) { + public Form1095C noTin(Boolean noTin) { this.noTin = noTin; return this; } /** - * Get noTin + * No TIN indicator * @return noTin */ @javax.annotation.Nullable @@ -1124,32 +1178,13 @@ public void setNoTin(Boolean noTin) { } - public Form1095BResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Get secondTinNotice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1095BResponse addressVerification(Boolean addressVerification) { + public Form1095C addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -1162,156 +1197,144 @@ public void setAddressVerification(Boolean addressVerification) { } - public Form1095BResponse federalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public Form1095C stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; return this; } /** - * Get federalEfileStatus - * @return federalEfileStatus + * State and local withholding information + * @return stateAndLocalWithholding */ @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; } - public void setFederalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; } - public Form1095BResponse eDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public Form1095C secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; return this; } /** - * Get eDeliveryStatus - * @return eDeliveryStatus + * Second TIN notice + * @return secondTinNotice */ @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; + public Boolean getSecondTinNotice() { + return secondTinNotice; } - public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; } - public Form1095BResponse stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; + /** + * Federal e-file status + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; } - public Form1095BResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); - return this; - } + /** - * Get stateEfileStatus + * State e-file status * @return stateEfileStatus */ @javax.annotation.Nullable - public List getStateEfileStatus() { + public List getStateEfileStatus() { return stateEfileStatus; } - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - } - - public Form1095BResponse postalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - return this; - } /** - * Get postalMailStatus + * Postal mail to recipient status * @return postalMailStatus */ @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { + public Form1099StatusDetail getPostalMailStatus() { return postalMailStatus; } - public void setPostalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - } - public Form1095BResponse tinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - return this; - } - /** - * Get tinMatchStatus + * TIN Match status * @return tinMatchStatus */ @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { + public Form1099StatusDetail getTinMatchStatus() { return tinMatchStatus; } - public void setTinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - } - public Form1095BResponse addressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - return this; - } - /** - * Get addressVerificationStatus + * Address verification status * @return addressVerificationStatus */ @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { + public Form1099StatusDetail getAddressVerificationStatus() { return addressVerificationStatus; } - public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - } - public Form1095BResponse validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; + /** + * EDelivery status + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; } - public Form1095BResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } + /** - * Get validationErrors + * Validation errors * @return validationErrors */ @javax.annotation.Nullable - public List getValidationErrors() { + public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; + + + /** + * Date time when the record was created. + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + /** + * Date time when the record was last updated. + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; } + @Override public boolean equals(Object o) { if (this == o) { @@ -1320,52 +1343,55 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Form1095BResponse form1095BResponse = (Form1095BResponse) o; - return Objects.equals(this.employeeFirstName, form1095BResponse.employeeFirstName) && - Objects.equals(this.employeeMiddleName, form1095BResponse.employeeMiddleName) && - Objects.equals(this.employeeLastName, form1095BResponse.employeeLastName) && - Objects.equals(this.employeeNameSuffix, form1095BResponse.employeeNameSuffix) && - Objects.equals(this.employeeDateOfBirth, form1095BResponse.employeeDateOfBirth) && - Objects.equals(this.originOfHealthCoverageCode, form1095BResponse.originOfHealthCoverageCode) && - Objects.equals(this.coveredIndividuals, form1095BResponse.coveredIndividuals) && - Objects.equals(this.type, form1095BResponse.type) && - Objects.equals(this.createdAt, form1095BResponse.createdAt) && - Objects.equals(this.updatedAt, form1095BResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1095BResponse.stateAndLocalWithholding) && - Objects.equals(this.tinType, form1095BResponse.tinType) && - Objects.equals(this.id, form1095BResponse.id) && - Objects.equals(this.issuerId, form1095BResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1095BResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1095BResponse.issuerTin) && - Objects.equals(this.taxYear, form1095BResponse.taxYear) && - Objects.equals(this.referenceId, form1095BResponse.referenceId) && - Objects.equals(this.recipientName, form1095BResponse.recipientName) && - Objects.equals(this.recipientTin, form1095BResponse.recipientTin) && - Objects.equals(this.recipientSecondName, form1095BResponse.recipientSecondName) && - Objects.equals(this.address, form1095BResponse.address) && - Objects.equals(this.address2, form1095BResponse.address2) && - Objects.equals(this.city, form1095BResponse.city) && - Objects.equals(this.state, form1095BResponse.state) && - Objects.equals(this.zip, form1095BResponse.zip) && - Objects.equals(this.email, form1095BResponse.email) && - Objects.equals(this.accountNumber, form1095BResponse.accountNumber) && - Objects.equals(this.officeCode, form1095BResponse.officeCode) && - Objects.equals(this.nonUsProvince, form1095BResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1095BResponse.countryCode) && - Objects.equals(this.federalEFile, form1095BResponse.federalEFile) && - Objects.equals(this.postalMail, form1095BResponse.postalMail) && - Objects.equals(this.stateEFile, form1095BResponse.stateEFile) && - Objects.equals(this.tinMatch, form1095BResponse.tinMatch) && - Objects.equals(this.noTin, form1095BResponse.noTin) && - Objects.equals(this.secondTinNotice, form1095BResponse.secondTinNotice) && - Objects.equals(this.addressVerification, form1095BResponse.addressVerification) && - Objects.equals(this.federalEfileStatus, form1095BResponse.federalEfileStatus) && - Objects.equals(this.eDeliveryStatus, form1095BResponse.eDeliveryStatus) && - Objects.equals(this.stateEfileStatus, form1095BResponse.stateEfileStatus) && - Objects.equals(this.postalMailStatus, form1095BResponse.postalMailStatus) && - Objects.equals(this.tinMatchStatus, form1095BResponse.tinMatchStatus) && - Objects.equals(this.addressVerificationStatus, form1095BResponse.addressVerificationStatus) && - Objects.equals(this.validationErrors, form1095BResponse.validationErrors); + Form1095C form1095C = (Form1095C) o; + return Objects.equals(this.employeeFirstName, form1095C.employeeFirstName) && + Objects.equals(this.employeeMiddleName, form1095C.employeeMiddleName) && + Objects.equals(this.employeeLastName, form1095C.employeeLastName) && + Objects.equals(this.employeeNameSuffix, form1095C.employeeNameSuffix) && + Objects.equals(this.recipientDateOfBirth, form1095C.recipientDateOfBirth) && + Objects.equals(this.planStartMonth, form1095C.planStartMonth) && + Objects.equals(this.employerProvidedSiCoverage, form1095C.employerProvidedSiCoverage) && + Objects.equals(this.offerAndCoverages, form1095C.offerAndCoverages) && + Objects.equals(this.coveredIndividuals, form1095C.coveredIndividuals) && + Objects.equals(this.type, form1095C.type) && + Objects.equals(this.id, form1095C.id) && + Objects.equals(this.issuerId, form1095C.issuerId) && + Objects.equals(this.issuerReferenceId, form1095C.issuerReferenceId) && + Objects.equals(this.issuerTin, form1095C.issuerTin) && + Objects.equals(this.taxYear, form1095C.taxYear) && + Objects.equals(this.referenceId, form1095C.referenceId) && + Objects.equals(this.tin, form1095C.tin) && + Objects.equals(this.recipientName, form1095C.recipientName) && + Objects.equals(this.tinType, form1095C.tinType) && + Objects.equals(this.recipientSecondName, form1095C.recipientSecondName) && + Objects.equals(this.address, form1095C.address) && + Objects.equals(this.address2, form1095C.address2) && + Objects.equals(this.city, form1095C.city) && + Objects.equals(this.state, form1095C.state) && + Objects.equals(this.zip, form1095C.zip) && + Objects.equals(this.email, form1095C.email) && + Objects.equals(this.accountNumber, form1095C.accountNumber) && + Objects.equals(this.officeCode, form1095C.officeCode) && + Objects.equals(this.nonUsProvince, form1095C.nonUsProvince) && + Objects.equals(this.countryCode, form1095C.countryCode) && + Objects.equals(this.federalEfileDate, form1095C.federalEfileDate) && + Objects.equals(this.postalMail, form1095C.postalMail) && + Objects.equals(this.stateEfileDate, form1095C.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1095C.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1095C.tinMatch) && + Objects.equals(this.noTin, form1095C.noTin) && + Objects.equals(this.addressVerification, form1095C.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1095C.stateAndLocalWithholding) && + Objects.equals(this.secondTinNotice, form1095C.secondTinNotice) && + Objects.equals(this.federalEfileStatus, form1095C.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1095C.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1095C.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1095C.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1095C.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1095C.eDeliveryStatus) && + Objects.equals(this.validationErrors, form1095C.validationErrors) && + Objects.equals(this.createdAt, form1095C.createdAt) && + Objects.equals(this.updatedAt, form1095C.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1374,7 +1400,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); + return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, recipientDateOfBirth, planStartMonth, employerProvidedSiCoverage, offerAndCoverages, coveredIndividuals, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -1387,27 +1413,26 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Form1095BResponse {\n"); + sb.append("class Form1095C {\n"); sb.append(" employeeFirstName: ").append(toIndentedString(employeeFirstName)).append("\n"); sb.append(" employeeMiddleName: ").append(toIndentedString(employeeMiddleName)).append("\n"); sb.append(" employeeLastName: ").append(toIndentedString(employeeLastName)).append("\n"); sb.append(" employeeNameSuffix: ").append(toIndentedString(employeeNameSuffix)).append("\n"); - sb.append(" employeeDateOfBirth: ").append(toIndentedString(employeeDateOfBirth)).append("\n"); - sb.append(" originOfHealthCoverageCode: ").append(toIndentedString(originOfHealthCoverageCode)).append("\n"); + sb.append(" recipientDateOfBirth: ").append(toIndentedString(recipientDateOfBirth)).append("\n"); + sb.append(" planStartMonth: ").append(toIndentedString(planStartMonth)).append("\n"); + sb.append(" employerProvidedSiCoverage: ").append(toIndentedString(employerProvidedSiCoverage)).append("\n"); + sb.append(" offerAndCoverages: ").append(toIndentedString(offerAndCoverages)).append("\n"); sb.append(" coveredIndividuals: ").append(toIndentedString(coveredIndividuals)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); @@ -1419,20 +1444,24 @@ public String toString() { sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1456,18 +1485,15 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("type"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("tinType"); openapiFields.add("id"); openapiFields.add("issuerId"); openapiFields.add("issuerReferenceId"); openapiFields.add("issuerTin"); openapiFields.add("taxYear"); openapiFields.add("referenceId"); + openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("recipientTin"); + openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); @@ -1479,43 +1505,63 @@ private String toIndentedString(Object o) { openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); + openapiFields.add("federalEfileDate"); openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); - openapiFields.add("eDeliveryStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); openapiFields.add("tinMatchStatus"); openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("validationErrors"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("employeeFirstName"); + openapiRequiredFields.add("employeeLastName"); + openapiRequiredFields.add("planStartMonth"); + openapiRequiredFields.add("offerAndCoverages"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1095BResponse + * @throws IOException if the JSON Element is invalid with respect to Form1095C */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!Form1095BResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1095BResponse is not found in the empty JSON string", Form1095BResponse.openapiRequiredFields.toString())); + if (!Form1095C.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1095C is not found in the empty JSON string", Form1095C.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!Form1095BResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095BResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!Form1095C.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095C` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1095C.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -1531,13 +1577,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("employeeNameSuffix") != null && !jsonObj.get("employeeNameSuffix").isJsonNull()) && !jsonObj.get("employeeNameSuffix").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `employeeNameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeNameSuffix").toString())); } - if ((jsonObj.get("originOfHealthCoverageCode") != null && !jsonObj.get("originOfHealthCoverageCode").isJsonNull()) && !jsonObj.get("originOfHealthCoverageCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `originOfHealthCoverageCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originOfHealthCoverageCode").toString())); + if ((jsonObj.get("planStartMonth") != null && !jsonObj.get("planStartMonth").isJsonNull()) && !jsonObj.get("planStartMonth").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `planStartMonth` to be a primitive type in the JSON string but got `%s`", jsonObj.get("planStartMonth").toString())); } - // validate the optional field `originOfHealthCoverageCode` - if (jsonObj.get("originOfHealthCoverageCode") != null && !jsonObj.get("originOfHealthCoverageCode").isJsonNull()) { - OriginOfHealthCoverageCodeEnum.validateJsonElement(jsonObj.get("originOfHealthCoverageCode")); + // validate the required field `planStartMonth` + PlanStartMonthEnum.validateJsonElement(jsonObj.get("planStartMonth")); + // ensure the json data is an array + if (!jsonObj.get("offerAndCoverages").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `offerAndCoverages` to be an array in the JSON string but got `%s`", jsonObj.get("offerAndCoverages").toString())); } + + JsonArray jsonArrayofferAndCoverages = jsonObj.getAsJsonArray("offerAndCoverages"); + // validate the required field `offerAndCoverages` (array) + for (int i = 0; i < jsonArrayofferAndCoverages.size(); i++) { + OfferAndCoverage.validateJsonElement(jsonArrayofferAndCoverages.get(i)); + }; if (jsonObj.get("coveredIndividuals") != null && !jsonObj.get("coveredIndividuals").isJsonNull()) { JsonArray jsonArraycoveredIndividuals = jsonObj.getAsJsonArray("coveredIndividuals"); if (jsonArraycoveredIndividuals != null) { @@ -1548,28 +1602,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `coveredIndividuals` (array) for (int i = 0; i < jsonArraycoveredIndividuals.size(); i++) { - CoveredIndividualRequest.validateJsonElement(jsonArraycoveredIndividuals.get(i)); + CoveredIndividual.validateJsonElement(jsonArraycoveredIndividuals.get(i)); }; } } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } @@ -1585,11 +1626,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); @@ -1624,13 +1672,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); @@ -1642,21 +1690,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `stateEfileStatus` (array) for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); }; } } // validate the optional field `postalMailStatus` if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); } // validate the optional field `tinMatchStatus` if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); } // validate the optional field `addressVerificationStatus` if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); @@ -1668,7 +1720,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `validationErrors` (array) for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); + ValidationError.validateJsonElement(jsonArrayvalidationErrors.get(i)); }; } } @@ -1678,22 +1730,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1095BResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1095BResponse' and its subtypes + if (!Form1095C.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1095C' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1095BResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1095C.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Form1095BResponse value) throws IOException { + public void write(JsonWriter out, Form1095C value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public Form1095BResponse read(JsonReader in) throws IOException { + public Form1095C read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -1704,18 +1756,18 @@ public Form1095BResponse read(JsonReader in) throws IOException { } /** - * Create an instance of Form1095BResponse given an JSON string + * Create an instance of Form1095C given an JSON string * * @param jsonString JSON string - * @return An instance of Form1095BResponse - * @throws IOException if the JSON string is invalid with respect to Form1095BResponse + * @return An instance of Form1095C + * @throws IOException if the JSON string is invalid with respect to Form1095C */ - public static Form1095BResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1095BResponse.class); + public static Form1095C fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1095C.class); } /** - * Convert an instance of Form1095BResponse to an JSON string + * Convert an instance of Form1095C to an JSON string * * @return JSON string */ diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095CList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095CList.java deleted file mode 100644 index 19b8fcd..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095CList.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1095CListItem; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1095CList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1095CList { - public static final String SERIALIZED_NAME_FORMS = "forms"; - @SerializedName(SERIALIZED_NAME_FORMS) - private List forms; - - public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; - @SerializedName(SERIALIZED_NAME_FORM_TYPE) - private String formType; - - public Form1095CList() { - } - - public Form1095CList forms(List forms) { - this.forms = forms; - return this; - } - - public Form1095CList addFormsItem(Form1095CListItem formsItem) { - if (this.forms == null) { - this.forms = new ArrayList<>(); - } - this.forms.add(formsItem); - return this; - } - - /** - * Get forms - * @return forms - */ - @javax.annotation.Nullable - public List getForms() { - return forms; - } - - public void setForms(List forms) { - this.forms = forms; - } - - - public Form1095CList formType(String formType) { - this.formType = formType; - return this; - } - - /** - * Get formType - * @return formType - */ - @javax.annotation.Nullable - public String getFormType() { - return formType; - } - - public void setFormType(String formType) { - this.formType = formType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1095CList form1095CList = (Form1095CList) o; - return Objects.equals(this.forms, form1095CList.forms) && - Objects.equals(this.formType, form1095CList.formType); - } - - @Override - public int hashCode() { - return Objects.hash(forms, formType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1095CList {\n"); - sb.append(" forms: ").append(toIndentedString(forms)).append("\n"); - sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("formType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1095CList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1095CList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1095CList is not found in the empty JSON string", Form1095CList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1095CList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095CList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("forms") != null && !jsonObj.get("forms").isJsonNull()) { - JsonArray jsonArrayforms = jsonObj.getAsJsonArray("forms"); - if (jsonArrayforms != null) { - // ensure the json data is an array - if (!jsonObj.get("forms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `forms` to be an array in the JSON string but got `%s`", jsonObj.get("forms").toString())); - } - - // validate the optional field `forms` (array) - for (int i = 0; i < jsonArrayforms.size(); i++) { - Form1095CListItem.validateJsonElement(jsonArrayforms.get(i)); - }; - } - } - if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1095CList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1095CList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1095CList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1095CList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1095CList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1095CList given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1095CList - * @throws IOException if the JSON string is invalid with respect to Form1095CList - */ - public static Form1095CList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1095CList.class); - } - - /** - * Convert an instance of Form1095CList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095CListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095CListItem.java deleted file mode 100644 index a0504fe..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095CListItem.java +++ /dev/null @@ -1,1339 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualRequest; -import Avalara.SDK.model.A1099.V2.OfferAndCoverageRequest; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1095CListItem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1095CListItem { - public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME) - private String employeeFirstName; - - public static final String SERIALIZED_NAME_EMPLOYEE_MIDDLE_NAME = "employeeMiddleName"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_MIDDLE_NAME) - private String employeeMiddleName; - - public static final String SERIALIZED_NAME_EMPLOYEE_LAST_NAME = "employeeLastName"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_LAST_NAME) - private String employeeLastName; - - public static final String SERIALIZED_NAME_EMPLOYEE_NAME_SUFFIX = "employeeNameSuffix"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_NAME_SUFFIX) - private String employeeNameSuffix; - - public static final String SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH = "recipientDateOfBirth"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_DATE_OF_BIRTH) - private OffsetDateTime recipientDateOfBirth; - - public static final String SERIALIZED_NAME_PLAN_START_MONTH = "planStartMonth"; - @SerializedName(SERIALIZED_NAME_PLAN_START_MONTH) - private String planStartMonth; - - public static final String SERIALIZED_NAME_OFFER_AND_COVERAGES = "offerAndCoverages"; - @SerializedName(SERIALIZED_NAME_OFFER_AND_COVERAGES) - private List offerAndCoverages; - - public static final String SERIALIZED_NAME_EMPLOYER_PROVIDED_SI_COVERAGE = "employerProvidedSiCoverage"; - @SerializedName(SERIALIZED_NAME_EMPLOYER_PROVIDED_SI_COVERAGE) - private Boolean employerProvidedSiCoverage; - - public static final String SERIALIZED_NAME_COVERED_INDIVIDUALS = "coveredIndividuals"; - @SerializedName(SERIALIZED_NAME_COVERED_INDIVIDUALS) - private List coveredIndividuals; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1095CListItem() { - } - - public Form1095CListItem employeeFirstName(String employeeFirstName) { - this.employeeFirstName = employeeFirstName; - return this; - } - - /** - * Employee's first name - * @return employeeFirstName - */ - @javax.annotation.Nullable - public String getEmployeeFirstName() { - return employeeFirstName; - } - - public void setEmployeeFirstName(String employeeFirstName) { - this.employeeFirstName = employeeFirstName; - } - - - public Form1095CListItem employeeMiddleName(String employeeMiddleName) { - this.employeeMiddleName = employeeMiddleName; - return this; - } - - /** - * Employee's middle name - * @return employeeMiddleName - */ - @javax.annotation.Nullable - public String getEmployeeMiddleName() { - return employeeMiddleName; - } - - public void setEmployeeMiddleName(String employeeMiddleName) { - this.employeeMiddleName = employeeMiddleName; - } - - - public Form1095CListItem employeeLastName(String employeeLastName) { - this.employeeLastName = employeeLastName; - return this; - } - - /** - * Employee's last name - * @return employeeLastName - */ - @javax.annotation.Nullable - public String getEmployeeLastName() { - return employeeLastName; - } - - public void setEmployeeLastName(String employeeLastName) { - this.employeeLastName = employeeLastName; - } - - - public Form1095CListItem employeeNameSuffix(String employeeNameSuffix) { - this.employeeNameSuffix = employeeNameSuffix; - return this; - } - - /** - * Employee's name suffix - * @return employeeNameSuffix - */ - @javax.annotation.Nullable - public String getEmployeeNameSuffix() { - return employeeNameSuffix; - } - - public void setEmployeeNameSuffix(String employeeNameSuffix) { - this.employeeNameSuffix = employeeNameSuffix; - } - - - public Form1095CListItem recipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { - this.recipientDateOfBirth = recipientDateOfBirth; - return this; - } - - /** - * Recipient's date of birth - * @return recipientDateOfBirth - */ - @javax.annotation.Nullable - public OffsetDateTime getRecipientDateOfBirth() { - return recipientDateOfBirth; - } - - public void setRecipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { - this.recipientDateOfBirth = recipientDateOfBirth; - } - - - public Form1095CListItem planStartMonth(String planStartMonth) { - this.planStartMonth = planStartMonth; - return this; - } - - /** - * Plan start month - * @return planStartMonth - */ - @javax.annotation.Nullable - public String getPlanStartMonth() { - return planStartMonth; - } - - public void setPlanStartMonth(String planStartMonth) { - this.planStartMonth = planStartMonth; - } - - - public Form1095CListItem offerAndCoverages(List offerAndCoverages) { - this.offerAndCoverages = offerAndCoverages; - return this; - } - - public Form1095CListItem addOfferAndCoveragesItem(OfferAndCoverageRequest offerAndCoveragesItem) { - if (this.offerAndCoverages == null) { - this.offerAndCoverages = new ArrayList<>(); - } - this.offerAndCoverages.add(offerAndCoveragesItem); - return this; - } - - /** - * Offer and coverage information - * @return offerAndCoverages - */ - @javax.annotation.Nullable - public List getOfferAndCoverages() { - return offerAndCoverages; - } - - public void setOfferAndCoverages(List offerAndCoverages) { - this.offerAndCoverages = offerAndCoverages; - } - - - public Form1095CListItem employerProvidedSiCoverage(Boolean employerProvidedSiCoverage) { - this.employerProvidedSiCoverage = employerProvidedSiCoverage; - return this; - } - - /** - * Employer provided self-insured coverage - * @return employerProvidedSiCoverage - */ - @javax.annotation.Nullable - public Boolean getEmployerProvidedSiCoverage() { - return employerProvidedSiCoverage; - } - - public void setEmployerProvidedSiCoverage(Boolean employerProvidedSiCoverage) { - this.employerProvidedSiCoverage = employerProvidedSiCoverage; - } - - - public Form1095CListItem coveredIndividuals(List coveredIndividuals) { - this.coveredIndividuals = coveredIndividuals; - return this; - } - - public Form1095CListItem addCoveredIndividualsItem(CoveredIndividualRequest coveredIndividualsItem) { - if (this.coveredIndividuals == null) { - this.coveredIndividuals = new ArrayList<>(); - } - this.coveredIndividuals.add(coveredIndividualsItem); - return this; - } - - /** - * Covered individuals information - * @return coveredIndividuals - */ - @javax.annotation.Nullable - public List getCoveredIndividuals() { - return coveredIndividuals; - } - - public void setCoveredIndividuals(List coveredIndividuals) { - this.coveredIndividuals = coveredIndividuals; - } - - - public Form1095CListItem issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1095CListItem issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1095CListItem taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nonnull - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1095CListItem issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1095CListItem referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1095CListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1095CListItem recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1095CListItem tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1095CListItem recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1095CListItem address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1095CListItem address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1095CListItem city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1095CListItem state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1095CListItem zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1095CListItem email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1095CListItem accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1095CListItem officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1095CListItem nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1095CListItem countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1095CListItem federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1095CListItem postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1095CListItem stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1095CListItem tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1095CListItem noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1095CListItem secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1095CListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1095CListItem addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1095CListItem stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1095CListItem form1095CListItem = (Form1095CListItem) o; - return Objects.equals(this.employeeFirstName, form1095CListItem.employeeFirstName) && - Objects.equals(this.employeeMiddleName, form1095CListItem.employeeMiddleName) && - Objects.equals(this.employeeLastName, form1095CListItem.employeeLastName) && - Objects.equals(this.employeeNameSuffix, form1095CListItem.employeeNameSuffix) && - Objects.equals(this.recipientDateOfBirth, form1095CListItem.recipientDateOfBirth) && - Objects.equals(this.planStartMonth, form1095CListItem.planStartMonth) && - Objects.equals(this.offerAndCoverages, form1095CListItem.offerAndCoverages) && - Objects.equals(this.employerProvidedSiCoverage, form1095CListItem.employerProvidedSiCoverage) && - Objects.equals(this.coveredIndividuals, form1095CListItem.coveredIndividuals) && - Objects.equals(this.issuerReferenceId, form1095CListItem.issuerReferenceId) && - Objects.equals(this.issuerTin, form1095CListItem.issuerTin) && - Objects.equals(this.taxYear, form1095CListItem.taxYear) && - Objects.equals(this.issuerId, form1095CListItem.issuerId) && - Objects.equals(this.referenceId, form1095CListItem.referenceId) && - Objects.equals(this.recipientTin, form1095CListItem.recipientTin) && - Objects.equals(this.recipientName, form1095CListItem.recipientName) && - Objects.equals(this.tinType, form1095CListItem.tinType) && - Objects.equals(this.recipientSecondName, form1095CListItem.recipientSecondName) && - Objects.equals(this.address, form1095CListItem.address) && - Objects.equals(this.address2, form1095CListItem.address2) && - Objects.equals(this.city, form1095CListItem.city) && - Objects.equals(this.state, form1095CListItem.state) && - Objects.equals(this.zip, form1095CListItem.zip) && - Objects.equals(this.email, form1095CListItem.email) && - Objects.equals(this.accountNumber, form1095CListItem.accountNumber) && - Objects.equals(this.officeCode, form1095CListItem.officeCode) && - Objects.equals(this.nonUsProvince, form1095CListItem.nonUsProvince) && - Objects.equals(this.countryCode, form1095CListItem.countryCode) && - Objects.equals(this.federalEFile, form1095CListItem.federalEFile) && - Objects.equals(this.postalMail, form1095CListItem.postalMail) && - Objects.equals(this.stateEFile, form1095CListItem.stateEFile) && - Objects.equals(this.tinMatch, form1095CListItem.tinMatch) && - Objects.equals(this.noTin, form1095CListItem.noTin) && - Objects.equals(this.secondTinNotice, form1095CListItem.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, form1095CListItem.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, form1095CListItem.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1095CListItem.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, recipientDateOfBirth, planStartMonth, offerAndCoverages, employerProvidedSiCoverage, coveredIndividuals, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1095CListItem {\n"); - sb.append(" employeeFirstName: ").append(toIndentedString(employeeFirstName)).append("\n"); - sb.append(" employeeMiddleName: ").append(toIndentedString(employeeMiddleName)).append("\n"); - sb.append(" employeeLastName: ").append(toIndentedString(employeeLastName)).append("\n"); - sb.append(" employeeNameSuffix: ").append(toIndentedString(employeeNameSuffix)).append("\n"); - sb.append(" recipientDateOfBirth: ").append(toIndentedString(recipientDateOfBirth)).append("\n"); - sb.append(" planStartMonth: ").append(toIndentedString(planStartMonth)).append("\n"); - sb.append(" offerAndCoverages: ").append(toIndentedString(offerAndCoverages)).append("\n"); - sb.append(" employerProvidedSiCoverage: ").append(toIndentedString(employerProvidedSiCoverage)).append("\n"); - sb.append(" coveredIndividuals: ").append(toIndentedString(coveredIndividuals)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("taxYear"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1095CListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1095CListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1095CListItem is not found in the empty JSON string", Form1095CListItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1095CListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095CListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1095CListItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("employeeFirstName") != null && !jsonObj.get("employeeFirstName").isJsonNull()) && !jsonObj.get("employeeFirstName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString())); - } - if ((jsonObj.get("employeeMiddleName") != null && !jsonObj.get("employeeMiddleName").isJsonNull()) && !jsonObj.get("employeeMiddleName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeMiddleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeMiddleName").toString())); - } - if ((jsonObj.get("employeeLastName") != null && !jsonObj.get("employeeLastName").isJsonNull()) && !jsonObj.get("employeeLastName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeLastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeLastName").toString())); - } - if ((jsonObj.get("employeeNameSuffix") != null && !jsonObj.get("employeeNameSuffix").isJsonNull()) && !jsonObj.get("employeeNameSuffix").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `employeeNameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeNameSuffix").toString())); - } - if ((jsonObj.get("planStartMonth") != null && !jsonObj.get("planStartMonth").isJsonNull()) && !jsonObj.get("planStartMonth").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `planStartMonth` to be a primitive type in the JSON string but got `%s`", jsonObj.get("planStartMonth").toString())); - } - if (jsonObj.get("offerAndCoverages") != null && !jsonObj.get("offerAndCoverages").isJsonNull()) { - JsonArray jsonArrayofferAndCoverages = jsonObj.getAsJsonArray("offerAndCoverages"); - if (jsonArrayofferAndCoverages != null) { - // ensure the json data is an array - if (!jsonObj.get("offerAndCoverages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `offerAndCoverages` to be an array in the JSON string but got `%s`", jsonObj.get("offerAndCoverages").toString())); - } - - // validate the optional field `offerAndCoverages` (array) - for (int i = 0; i < jsonArrayofferAndCoverages.size(); i++) { - OfferAndCoverageRequest.validateJsonElement(jsonArrayofferAndCoverages.get(i)); - }; - } - } - if (jsonObj.get("coveredIndividuals") != null && !jsonObj.get("coveredIndividuals").isJsonNull()) { - JsonArray jsonArraycoveredIndividuals = jsonObj.getAsJsonArray("coveredIndividuals"); - if (jsonArraycoveredIndividuals != null) { - // ensure the json data is an array - if (!jsonObj.get("coveredIndividuals").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `coveredIndividuals` to be an array in the JSON string but got `%s`", jsonObj.get("coveredIndividuals").toString())); - } - - // validate the optional field `coveredIndividuals` (array) - for (int i = 0; i < jsonArraycoveredIndividuals.size(); i++) { - CoveredIndividualRequest.validateJsonElement(jsonArraycoveredIndividuals.get(i)); - }; - } - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1095CListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1095CListItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1095CListItem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1095CListItem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1095CListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1095CListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1095CListItem - * @throws IOException if the JSON string is invalid with respect to Form1095CListItem - */ - public static Form1095CListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1095CListItem.class); - } - - /** - * Convert an instance of Form1095CListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java index baecd0e..fc7ba62 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java @@ -30,6 +30,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -65,17 +66,83 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1099Base { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; + /** + * Form type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1099_NEC("1099-NEC"), + + _1099_MISC("1099-MISC"), + + _1099_DIV("1099-DIV"), + + _1099_R("1099-R"), + + _1099_K("1099-K"), + + _1095_B("1095-B"), + + _1042_S("1042-S"), + + _1095_C("1095-C"), + + _1099_INT("1099-INT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private String type; + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; + private String issuerId; public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) @@ -89,81 +156,79 @@ public class Form1099Base { @SerializedName(SERIALIZED_NAME_TAX_YEAR) private Integer taxYear; - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private Form1099StatusDetail postalMailStatus; + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; + /** + * Type of TIN (Tax ID Number) + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EMPTY("Empty"), + + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"); + + private String value; + + TinTypeEnum(String value) { + this.value = value; + } - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private Form1099StatusDetail tinMatchStatus; + public String getValue() { + return value; + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; + @Override + public String toString() { + return String.valueOf(value); + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private Form1099StatusDetail addressVerificationStatus; + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private Form1099StatusDetail eDeliveryStatus; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; + private TinTypeEnum tinType; public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) @@ -189,6 +254,18 @@ public class Form1099Base { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -197,13 +274,65 @@ public class Form1099Base { @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) private String countryCode; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) @@ -217,66 +346,79 @@ public class Form1099Base { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholding stateAndLocalWithholding; - public Form1099Base() { } - public Form1099Base id(String id) { + public Form1099Base( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public Form1099Base type(TypeEnum type) { + this.type = type; return this; } /** - * Get id - * @return id + * Form type + * @return type */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; } - - public Form1099Base type(String type) { + public void setType(TypeEnum type) { this.type = type; - return this; } + /** - * Get type - * @return type + * Form ID. Unique identifier set when the record is created. + * @return id */ @javax.annotation.Nullable - public String getType() { - return type; + public String getId() { + return id; } - public void setType(String type) { - this.type = type; - } - public Form1099Base issuerId(Integer issuerId) { + public Form1099Base issuerId(String issuerId) { this.issuerId = issuerId; return this; } /** - * Get issuerId + * Issuer ID - only required when creating forms * @return issuerId */ @javax.annotation.Nullable - public Integer getIssuerId() { + public String getIssuerId() { return issuerId; } - public void setIssuerId(Integer issuerId) { + public void setIssuerId(String issuerId) { this.issuerId = issuerId; } @@ -287,7 +429,7 @@ public Form1099Base issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID - only required when creating forms * @return issuerReferenceId */ @javax.annotation.Nullable @@ -306,7 +448,7 @@ public Form1099Base issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN - readonly * @return issuerTin */ @javax.annotation.Nullable @@ -325,7 +467,7 @@ public Form1099Base taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax Year - only required when creating forms * @return taxYear */ @javax.annotation.Nullable @@ -338,239 +480,193 @@ public void setTaxYear(Integer taxYear) { } - public Form1099Base federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Get federalEfile - * @return federalEfile - */ - @javax.annotation.Nullable - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - public Form1099Base federalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - return this; - } - - /** - * Get federalEfileStatus - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - public void setFederalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - } - - - public Form1099Base stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public Form1099Base referenceId(String referenceId) { + this.referenceId = referenceId; return this; } /** - * Get stateEfile - * @return stateEfile + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId */ @javax.annotation.Nullable - public Boolean getStateEfile() { - return stateEfile; + public String getReferenceId() { + return referenceId; } - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; } - public Form1099Base stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099Base addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); + public Form1099Base tin(String tin) { + this.tin = tin; return this; } /** - * Get stateEfileStatus - * @return stateEfileStatus + * Recipient's Federal Tax Identification Number (TIN). + * @return tin */ @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; + public String getTin() { + return tin; } - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; + public void setTin(String tin) { + this.tin = tin; } - public Form1099Base postalMail(Boolean postalMail) { - this.postalMail = postalMail; + public Form1099Base recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get postalMail - * @return postalMail + * Recipient name + * @return recipientName */ @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; + public String getRecipientName() { + return recipientName; } - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } - public Form1099Base postalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public Form1099Base tinType(TinTypeEnum tinType) { + this.tinType = tinType; return this; } /** - * Get postalMailStatus - * @return postalMailStatus + * Type of TIN (Tax ID Number) + * @return tinType */ @javax.annotation.Nullable - public Form1099StatusDetail getPostalMailStatus() { - return postalMailStatus; + public TinTypeEnum getTinType() { + return tinType; } - public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; } - public Form1099Base tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public Form1099Base recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; return this; } /** - * Get tinMatch - * @return tinMatch + * Recipient second name + * @return recipientSecondName */ @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; + public String getRecipientSecondName() { + return recipientSecondName; } - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; } - public Form1099Base tinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public Form1099Base address(String address) { + this.address = address; return this; } /** - * Get tinMatchStatus - * @return tinMatchStatus + * Address. + * @return address */ @javax.annotation.Nullable - public Form1099StatusDetail getTinMatchStatus() { - return tinMatchStatus; + public String getAddress() { + return address; } - public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public void setAddress(String address) { + this.address = address; } - public Form1099Base addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public Form1099Base address2(String address2) { + this.address2 = address2; return this; } /** - * Get addressVerification - * @return addressVerification + * Address line 2. + * @return address2 */ @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; + public String getAddress2() { + return address2; } - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public void setAddress2(String address2) { + this.address2 = address2; } - public Form1099Base addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public Form1099Base city(String city) { + this.city = city; return this; } /** - * Get addressVerificationStatus - * @return addressVerificationStatus + * City. + * @return city */ @javax.annotation.Nullable - public Form1099StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; + public String getCity() { + return city; } - public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public void setCity(String city) { + this.city = city; } - public Form1099Base eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public Form1099Base state(String state) { + this.state = state; return this; } /** - * Get eDeliveryStatus - * @return eDeliveryStatus + * Two-letter US state or Canadian province code (required for US/CA addresses). + * @return state */ @javax.annotation.Nullable - public Form1099StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; + public String getState() { + return state; } - public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public void setState(String state) { + this.state = state; } - public Form1099Base referenceId(String referenceId) { - this.referenceId = referenceId; + public Form1099Base zip(String zip) { + this.zip = zip; return this; } /** - * Get referenceId - * @return referenceId + * ZIP/postal code. + * @return zip */ @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; + public String getZip() { + return zip; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; + public void setZip(String zip) { + this.zip = zip; } @@ -580,7 +676,7 @@ public Form1099Base email(String email) { } /** - * Get email + * Recipient's Contact email address. * @return email */ @javax.annotation.Nullable @@ -593,325 +689,321 @@ public void setEmail(String email) { } - public Form1099Base tinType(String tinType) { - this.tinType = tinType; + public Form1099Base accountNumber(String accountNumber) { + this.accountNumber = accountNumber; return this; } /** - * Get tinType - * @return tinType + * Account number + * @return accountNumber */ @javax.annotation.Nullable - public String getTinType() { - return tinType; + public String getAccountNumber() { + return accountNumber; } - public void setTinType(String tinType) { - this.tinType = tinType; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; } - public Form1099Base fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public Form1099Base officeCode(String officeCode) { + this.officeCode = officeCode; return this; } /** - * Get fatcaFilingRequirement - * @return fatcaFilingRequirement + * Office code + * @return officeCode */ @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; + public String getOfficeCode() { + return officeCode; } - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; } - public Form1099Base tin(String tin) { - this.tin = tin; + public Form1099Base nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get tin - * @return tin + * Province or region for non-US/CA addresses. + * @return nonUsProvince */ @javax.annotation.Nullable - public String getTin() { - return tin; + public String getNonUsProvince() { + return nonUsProvince; } - public void setTin(String tin) { - this.tin = tin; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } - public Form1099Base noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099Base countryCode(String countryCode) { + this.countryCode = countryCode; return this; } /** - * Get noTin - * @return noTin + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public String getCountryCode() { + return countryCode; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; } - public Form1099Base secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public Form1099Base federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; return this; } /** - * Get secondTinNotice - * @return secondTinNotice + * Date when federal e-filing should be scheduled for this form + * @return federalEfileDate */ @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; + public LocalDate getFederalEfileDate() { + return federalEfileDate; } - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; } - public Form1099Base recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099Base postalMail(Boolean postalMail) { + this.postalMail = postalMail; return this; } /** - * Get recipientName - * @return recipientName + * Boolean indicating that postal mailing to the recipient should be scheduled for this form + * @return postalMail */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public Boolean getPostalMail() { + return postalMail; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; } - public Form1099Base recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public Form1099Base stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; return this; } /** - * Get recipientSecondName - * @return recipientSecondName + * Date when state e-filing should be scheduled for this form + * @return stateEfileDate */ @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; + public LocalDate getStateEfileDate() { + return stateEfileDate; } - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; } - public Form1099Base address(String address) { - this.address = address; + public Form1099Base recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; return this; } /** - * Get address - * @return address + * Date when recipient e-delivery should be scheduled for this form + * @return recipientEdeliveryDate */ @javax.annotation.Nullable - public String getAddress() { - return address; + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; } - public void setAddress(String address) { - this.address = address; + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; } - public Form1099Base address2(String address2) { - this.address2 = address2; + public Form1099Base tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; return this; } /** - * Get address2 - * @return address2 + * Boolean indicating that TIN Matching should be scheduled for this form + * @return tinMatch */ @javax.annotation.Nullable - public String getAddress2() { - return address2; + public Boolean getTinMatch() { + return tinMatch; } - public void setAddress2(String address2) { - this.address2 = address2; + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; } - public Form1099Base city(String city) { - this.city = city; + public Form1099Base noTin(Boolean noTin) { + this.noTin = noTin; return this; } /** - * Get city - * @return city + * No TIN indicator + * @return noTin */ @javax.annotation.Nullable - public String getCity() { - return city; + public Boolean getNoTin() { + return noTin; } - public void setCity(String city) { - this.city = city; + public void setNoTin(Boolean noTin) { + this.noTin = noTin; } - public Form1099Base state(String state) { - this.state = state; + public Form1099Base addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * Get state - * @return state + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public String getState() { - return state; + public Boolean getAddressVerification() { + return addressVerification; } - public void setState(String state) { - this.state = state; + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } - public Form1099Base zip(String zip) { - this.zip = zip; + public Form1099Base stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; return this; } /** - * Get zip - * @return zip + * State and local withholding information + * @return stateAndLocalWithholding */ @javax.annotation.Nullable - public String getZip() { - return zip; + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; } - public void setZip(String zip) { - this.zip = zip; + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; } - public Form1099Base nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; + public Form1099Base secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; return this; } /** - * Get nonUsProvince - * @return nonUsProvince + * Second TIN notice + * @return secondTinNotice */ @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; + public Boolean getSecondTinNotice() { + return secondTinNotice; } - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; } - public Form1099Base countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - /** - * Get countryCode - * @return countryCode + * Federal e-file status + * @return federalEfileStatus */ @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; } - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - public Form1099Base accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; + /** + * State e-file status + * @return stateEfileStatus + */ + @javax.annotation.Nullable + public List getStateEfileStatus() { + return stateEfileStatus; } + + /** - * Get accountNumber - * @return accountNumber + * Postal mail to recipient status + * @return postalMailStatus */ @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - public Form1099Base officeCode(String officeCode) { - this.officeCode = officeCode; - return this; + /** + * TIN Match status + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; } + + /** - * Get officeCode - * @return officeCode + * Address verification status + * @return addressVerificationStatus */ @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; } - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - public Form1099Base validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; + /** + * EDelivery status + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; } - public Form1099Base addValidationErrorsItem(ValidationError validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } + /** - * Get validationErrors + * Validation errors * @return validationErrors */ @javax.annotation.Nullable @@ -919,18 +1011,10 @@ public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - public Form1099Base createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } /** - * Get createdAt + * Date time when the record was created. * @return createdAt */ @javax.annotation.Nullable @@ -938,18 +1022,10 @@ public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public Form1099Base updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } /** - * Get updatedAt + * Date time when the record was last updated. * @return updatedAt */ @javax.annotation.Nullable @@ -957,28 +1033,6 @@ public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099Base stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholding getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } @@ -991,45 +1045,45 @@ public boolean equals(Object o) { return false; } Form1099Base form1099Base = (Form1099Base) o; - return Objects.equals(this.id, form1099Base.id) && - Objects.equals(this.type, form1099Base.type) && + return Objects.equals(this.type, form1099Base.type) && + Objects.equals(this.id, form1099Base.id) && Objects.equals(this.issuerId, form1099Base.issuerId) && Objects.equals(this.issuerReferenceId, form1099Base.issuerReferenceId) && Objects.equals(this.issuerTin, form1099Base.issuerTin) && Objects.equals(this.taxYear, form1099Base.taxYear) && - Objects.equals(this.federalEfile, form1099Base.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099Base.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099Base.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099Base.stateEfileStatus) && - Objects.equals(this.postalMail, form1099Base.postalMail) && - Objects.equals(this.postalMailStatus, form1099Base.postalMailStatus) && - Objects.equals(this.tinMatch, form1099Base.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099Base.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099Base.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099Base.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099Base.eDeliveryStatus) && Objects.equals(this.referenceId, form1099Base.referenceId) && - Objects.equals(this.email, form1099Base.email) && - Objects.equals(this.tinType, form1099Base.tinType) && - Objects.equals(this.fatcaFilingRequirement, form1099Base.fatcaFilingRequirement) && Objects.equals(this.tin, form1099Base.tin) && - Objects.equals(this.noTin, form1099Base.noTin) && - Objects.equals(this.secondTinNotice, form1099Base.secondTinNotice) && Objects.equals(this.recipientName, form1099Base.recipientName) && + Objects.equals(this.tinType, form1099Base.tinType) && Objects.equals(this.recipientSecondName, form1099Base.recipientSecondName) && Objects.equals(this.address, form1099Base.address) && Objects.equals(this.address2, form1099Base.address2) && Objects.equals(this.city, form1099Base.city) && Objects.equals(this.state, form1099Base.state) && Objects.equals(this.zip, form1099Base.zip) && - Objects.equals(this.nonUsProvince, form1099Base.nonUsProvince) && - Objects.equals(this.countryCode, form1099Base.countryCode) && + Objects.equals(this.email, form1099Base.email) && Objects.equals(this.accountNumber, form1099Base.accountNumber) && Objects.equals(this.officeCode, form1099Base.officeCode) && + Objects.equals(this.nonUsProvince, form1099Base.nonUsProvince) && + Objects.equals(this.countryCode, form1099Base.countryCode) && + Objects.equals(this.federalEfileDate, form1099Base.federalEfileDate) && + Objects.equals(this.postalMail, form1099Base.postalMail) && + Objects.equals(this.stateEfileDate, form1099Base.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099Base.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099Base.tinMatch) && + Objects.equals(this.noTin, form1099Base.noTin) && + Objects.equals(this.addressVerification, form1099Base.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099Base.stateAndLocalWithholding) && + Objects.equals(this.secondTinNotice, form1099Base.secondTinNotice) && + Objects.equals(this.federalEfileStatus, form1099Base.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099Base.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099Base.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099Base.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099Base.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099Base.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099Base.validationErrors) && Objects.equals(this.createdAt, form1099Base.createdAt) && - Objects.equals(this.updatedAt, form1099Base.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099Base.stateAndLocalWithholding); + Objects.equals(this.updatedAt, form1099Base.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1038,7 +1092,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, fatcaFilingRequirement, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -1052,45 +1106,45 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Form1099Base {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1113,48 +1167,53 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("id"); openapiFields.add("type"); + openapiFields.add("id"); openapiFields.add("issuerId"); openapiFields.add("issuerReferenceId"); openapiFields.add("issuerTin"); openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); + openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); + openapiFields.add("email"); openapiFields.add("accountNumber"); openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("secondTinNotice"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1177,12 +1236,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099Base` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099Base.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); } if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); @@ -1190,55 +1261,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } @@ -1257,17 +1295,58 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); @@ -1283,10 +1362,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099BaseResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099BaseResponse.java deleted file mode 100644 index 128ff23..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099BaseResponse.java +++ /dev/null @@ -1,1246 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099BaseResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099BaseResponse { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - public Form1099BaseResponse() { - } - - public Form1099BaseResponse( - String id, - StatusDetail federalEfileStatus, - List stateEfileStatus, - StatusDetail postalMailStatus, - StatusDetail tinMatchStatus, - StatusDetail addressVerificationStatus, - StatusDetail eDeliveryStatus, - List validationErrors, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.id = id; - this.federalEfileStatus = federalEfileStatus; - this.stateEfileStatus = stateEfileStatus; - this.postalMailStatus = postalMailStatus; - this.tinMatchStatus = tinMatchStatus; - this.addressVerificationStatus = addressVerificationStatus; - this.eDeliveryStatus = eDeliveryStatus; - this.validationErrors = validationErrors; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - /** - * ID of the form - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - - public Form1099BaseResponse type(String type) { - this.type = type; - return this; - } - - /** - * Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public Form1099BaseResponse issuerId(Integer issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nonnull - public Integer getIssuerId() { - return issuerId; - } - - public void setIssuerId(Integer issuerId) { - this.issuerId = issuerId; - } - - - public Form1099BaseResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099BaseResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099BaseResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099BaseResponse federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Boolean indicating that federal e-filing has been scheduled for this form - * @return federalEfile - */ - @javax.annotation.Nonnull - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - /** - * Federal e-file status - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - - - public Form1099BaseResponse stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - return this; - } - - /** - * Boolean indicating that state e-filing has been scheduled for this form - * @return stateEfile - */ - @javax.annotation.Nonnull - public Boolean getStateEfile() { - return stateEfile; - } - - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - } - - - /** - * State e-file status - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - - - public Form1099BaseResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient has been scheduled for this form - * @return postalMail - */ - @javax.annotation.Nonnull - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - /** - * Postal mail to recipient status - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - - - public Form1099BaseResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching has been scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nonnull - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - /** - * TIN Match status - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - - - public Form1099BaseResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification has been scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nonnull - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - /** - * Address verification status - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - - - /** - * EDelivery status - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - - - public Form1099BaseResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099BaseResponse email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099BaseResponse tinType(String tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public String getTinType() { - return tinType; - } - - public void setTinType(String tinType) { - this.tinType = tinType; - } - - - public Form1099BaseResponse tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Recipient Tax ID Number - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public Form1099BaseResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099BaseResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second Tin Notice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099BaseResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099BaseResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099BaseResponse address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099BaseResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099BaseResponse city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099BaseResponse state(String state) { - this.state = state; - return this; - } - - /** - * US state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099BaseResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099BaseResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099BaseResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099BaseResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account Number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099BaseResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office Code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099BaseResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - /** - * Validation errors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - - - /** - * Creation time - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - /** - * Update time - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - public Form1099BaseResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099BaseResponse form1099BaseResponse = (Form1099BaseResponse) o; - return Objects.equals(this.id, form1099BaseResponse.id) && - Objects.equals(this.type, form1099BaseResponse.type) && - Objects.equals(this.issuerId, form1099BaseResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099BaseResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099BaseResponse.issuerTin) && - Objects.equals(this.taxYear, form1099BaseResponse.taxYear) && - Objects.equals(this.federalEfile, form1099BaseResponse.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099BaseResponse.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099BaseResponse.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099BaseResponse.stateEfileStatus) && - Objects.equals(this.postalMail, form1099BaseResponse.postalMail) && - Objects.equals(this.postalMailStatus, form1099BaseResponse.postalMailStatus) && - Objects.equals(this.tinMatch, form1099BaseResponse.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099BaseResponse.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099BaseResponse.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099BaseResponse.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099BaseResponse.eDeliveryStatus) && - Objects.equals(this.referenceId, form1099BaseResponse.referenceId) && - Objects.equals(this.email, form1099BaseResponse.email) && - Objects.equals(this.tinType, form1099BaseResponse.tinType) && - Objects.equals(this.tin, form1099BaseResponse.tin) && - Objects.equals(this.noTin, form1099BaseResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099BaseResponse.secondTinNotice) && - Objects.equals(this.recipientName, form1099BaseResponse.recipientName) && - Objects.equals(this.recipientSecondName, form1099BaseResponse.recipientSecondName) && - Objects.equals(this.address, form1099BaseResponse.address) && - Objects.equals(this.address2, form1099BaseResponse.address2) && - Objects.equals(this.city, form1099BaseResponse.city) && - Objects.equals(this.state, form1099BaseResponse.state) && - Objects.equals(this.zip, form1099BaseResponse.zip) && - Objects.equals(this.nonUsProvince, form1099BaseResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099BaseResponse.countryCode) && - Objects.equals(this.accountNumber, form1099BaseResponse.accountNumber) && - Objects.equals(this.officeCode, form1099BaseResponse.officeCode) && - Objects.equals(this.fatcaFilingRequirement, form1099BaseResponse.fatcaFilingRequirement) && - Objects.equals(this.validationErrors, form1099BaseResponse.validationErrors) && - Objects.equals(this.createdAt, form1099BaseResponse.createdAt) && - Objects.equals(this.updatedAt, form1099BaseResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099BaseResponse.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, fatcaFilingRequirement, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099BaseResponse {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("issuerId"); - openapiRequiredFields.add("federalEfile"); - openapiRequiredFields.add("stateEfile"); - openapiRequiredFields.add("postalMail"); - openapiRequiredFields.add("tinMatch"); - openapiRequiredFields.add("addressVerification"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099BaseResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099BaseResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099BaseResponse is not found in the empty JSON string", Form1099BaseResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099BaseResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099BaseResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099BaseResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099BaseResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099BaseResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099BaseResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099BaseResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099BaseResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099BaseResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099BaseResponse - * @throws IOException if the JSON string is invalid with respect to Form1099BaseResponse - */ - public static Form1099BaseResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099BaseResponse.class); - } - - /** - * Convert an instance of Form1099BaseResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java index df98ea0..76ad052 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java @@ -30,6 +30,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -61,7 +62,7 @@ import Avalara.SDK.JSON; /** - * Form1099Div + * Form 1099-DIV: Dividends and Distributions */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1099Div { @@ -141,17 +142,83 @@ public class Form1099Div { @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) private Boolean fatcaFilingRequirement; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; + /** + * Form type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1099_NEC("1099-NEC"), + + _1099_MISC("1099-MISC"), + + _1099_DIV("1099-DIV"), + + _1099_R("1099-R"), + + _1099_K("1099-K"), + + _1095_B("1095-B"), + + _1042_S("1042-S"), + + _1095_C("1095-C"), + + _1099_INT("1099-INT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private String type; + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; + private String issuerId; public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) @@ -165,77 +232,79 @@ public class Form1099Div { @SerializedName(SERIALIZED_NAME_TAX_YEAR) private Integer taxYear; - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private Form1099StatusDetail postalMailStatus; + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; + /** + * Type of TIN (Tax ID Number) + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EMPTY("Empty"), + + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"); + + private String value; + + TinTypeEnum(String value) { + this.value = value; + } - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private Form1099StatusDetail tinMatchStatus; + public String getValue() { + return value; + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; + @Override + public String toString() { + return String.valueOf(value); + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private Form1099StatusDetail addressVerificationStatus; + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private Form1099StatusDetail eDeliveryStatus; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; + private TinTypeEnum tinType; public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) @@ -261,6 +330,18 @@ public class Form1099Div { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -269,13 +350,65 @@ public class Form1099Div { @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) private String countryCode; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) @@ -289,20 +422,41 @@ public class Form1099Div { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholding stateAndLocalWithholding; - public Form1099Div() { } + public Form1099Div( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + public Form1099Div totalOrdinaryDividends(Double totalOrdinaryDividends) { this.totalOrdinaryDividends = totalOrdinaryDividends; return this; } /** - * Get totalOrdinaryDividends + * Total ordinary dividends * @return totalOrdinaryDividends */ @javax.annotation.Nullable @@ -321,7 +475,7 @@ public Form1099Div qualifiedDividends(Double qualifiedDividends) { } /** - * Get qualifiedDividends + * Qualified dividends * @return qualifiedDividends */ @javax.annotation.Nullable @@ -340,7 +494,7 @@ public Form1099Div totalCapitalGainDistributions(Double totalCapitalGainDistribu } /** - * Get totalCapitalGainDistributions + * Total capital gain distributions * @return totalCapitalGainDistributions */ @javax.annotation.Nullable @@ -359,7 +513,7 @@ public Form1099Div unrecapturedSection1250Gain(Double unrecapturedSection1250Gai } /** - * Get unrecapturedSection1250Gain + * Unrecaptured Section 1250 gain * @return unrecapturedSection1250Gain */ @javax.annotation.Nullable @@ -378,7 +532,7 @@ public Form1099Div section1202Gain(Double section1202Gain) { } /** - * Get section1202Gain + * Section 1202 gain * @return section1202Gain */ @javax.annotation.Nullable @@ -397,7 +551,7 @@ public Form1099Div collectiblesGain(Double collectiblesGain) { } /** - * Get collectiblesGain + * Collectibles (28%) gain * @return collectiblesGain */ @javax.annotation.Nullable @@ -416,7 +570,7 @@ public Form1099Div section897OrdinaryDividends(Double section897OrdinaryDividend } /** - * Get section897OrdinaryDividends + * Section 897 ordinary dividends * @return section897OrdinaryDividends */ @javax.annotation.Nullable @@ -435,7 +589,7 @@ public Form1099Div section897CapitalGain(Double section897CapitalGain) { } /** - * Get section897CapitalGain + * Section 897 capital gain * @return section897CapitalGain */ @javax.annotation.Nullable @@ -454,7 +608,7 @@ public Form1099Div nondividendDistributions(Double nondividendDistributions) { } /** - * Get nondividendDistributions + * Nondividend distributions * @return nondividendDistributions */ @javax.annotation.Nullable @@ -473,7 +627,7 @@ public Form1099Div federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { } /** - * Get federalIncomeTaxWithheld + * Federal income tax withheld * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable @@ -492,7 +646,7 @@ public Form1099Div section199ADividends(Double section199ADividends) { } /** - * Get section199ADividends + * Section 199A dividends * @return section199ADividends */ @javax.annotation.Nullable @@ -511,7 +665,7 @@ public Form1099Div investmentExpenses(Double investmentExpenses) { } /** - * Get investmentExpenses + * Investment expenses * @return investmentExpenses */ @javax.annotation.Nullable @@ -530,7 +684,7 @@ public Form1099Div foreignTaxPaid(Double foreignTaxPaid) { } /** - * Get foreignTaxPaid + * Foreign tax paid * @return foreignTaxPaid */ @javax.annotation.Nullable @@ -549,7 +703,7 @@ public Form1099Div foreignCountryOrUSPossession(String foreignCountryOrUSPossess } /** - * Get foreignCountryOrUSPossession + * Foreign country or U.S. possession * @return foreignCountryOrUSPossession */ @javax.annotation.Nullable @@ -568,7 +722,7 @@ public Form1099Div cashLiquidationDistributions(Double cashLiquidationDistributi } /** - * Get cashLiquidationDistributions + * Cash liquidation distributions * @return cashLiquidationDistributions */ @javax.annotation.Nullable @@ -587,7 +741,7 @@ public Form1099Div noncashLiquidationDistributions(Double noncashLiquidationDist } /** - * Get noncashLiquidationDistributions + * Noncash liquidation distributions * @return noncashLiquidationDistributions */ @javax.annotation.Nullable @@ -606,7 +760,7 @@ public Form1099Div exemptInterestDividends(Double exemptInterestDividends) { } /** - * Get exemptInterestDividends + * Exempt-interest dividends * @return exemptInterestDividends */ @javax.annotation.Nullable @@ -625,7 +779,7 @@ public Form1099Div specifiedPrivateActivityBondInterestDividends(Double specifie } /** - * Get specifiedPrivateActivityBondInterestDividends + * Specified private activity bond interest dividends * @return specifiedPrivateActivityBondInterestDividends */ @javax.annotation.Nullable @@ -644,7 +798,7 @@ public Form1099Div fatcaFilingRequirement(Boolean fatcaFilingRequirement) { } /** - * Get fatcaFilingRequirement + * FATCA filing requirement * @return fatcaFilingRequirement */ @javax.annotation.Nullable @@ -657,59 +811,51 @@ public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { } - public Form1099Div id(String id) { - this.id = id; + public Form1099Div type(TypeEnum type) { + this.type = type; return this; } /** - * Get id - * @return id + * Form type + * @return type */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; } - - public Form1099Div type(String type) { + public void setType(TypeEnum type) { this.type = type; - return this; } + /** - * Get type - * @return type + * Form ID. Unique identifier set when the record is created. + * @return id */ @javax.annotation.Nullable - public String getType() { - return type; + public String getId() { + return id; } - public void setType(String type) { - this.type = type; - } - public Form1099Div issuerId(Integer issuerId) { + public Form1099Div issuerId(String issuerId) { this.issuerId = issuerId; return this; } /** - * Get issuerId + * Issuer ID - only required when creating forms * @return issuerId */ @javax.annotation.Nullable - public Integer getIssuerId() { + public String getIssuerId() { return issuerId; } - public void setIssuerId(Integer issuerId) { + public void setIssuerId(String issuerId) { this.issuerId = issuerId; } @@ -720,7 +866,7 @@ public Form1099Div issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID - only required when creating forms * @return issuerReferenceId */ @javax.annotation.Nullable @@ -739,7 +885,7 @@ public Form1099Div issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN - readonly * @return issuerTin */ @javax.annotation.Nullable @@ -758,7 +904,7 @@ public Form1099Div taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax Year - only required when creating forms * @return taxYear */ @javax.annotation.Nullable @@ -771,561 +917,530 @@ public void setTaxYear(Integer taxYear) { } - public Form1099Div federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; + public Form1099Div referenceId(String referenceId) { + this.referenceId = referenceId; return this; } /** - * Get federalEfile - * @return federalEfile + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId */ @javax.annotation.Nullable - public Boolean getFederalEfile() { - return federalEfile; + public String getReferenceId() { + return referenceId; } - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; } - public Form1099Div federalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public Form1099Div tin(String tin) { + this.tin = tin; return this; } /** - * Get federalEfileStatus - * @return federalEfileStatus + * Recipient's Federal Tax Identification Number (TIN). + * @return tin */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { - return federalEfileStatus; + public String getTin() { + return tin; } - public void setFederalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public void setTin(String tin) { + this.tin = tin; } - public Form1099Div stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public Form1099Div recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get stateEfile - * @return stateEfile + * Recipient name + * @return recipientName */ @javax.annotation.Nullable - public Boolean getStateEfile() { - return stateEfile; + public String getRecipientName() { + return recipientName; } - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } - public Form1099Div stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099Div addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); + public Form1099Div tinType(TinTypeEnum tinType) { + this.tinType = tinType; return this; } /** - * Get stateEfileStatus - * @return stateEfileStatus + * Type of TIN (Tax ID Number) + * @return tinType */ @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; + public TinTypeEnum getTinType() { + return tinType; } - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; } - public Form1099Div postalMail(Boolean postalMail) { - this.postalMail = postalMail; + public Form1099Div recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; return this; } /** - * Get postalMail - * @return postalMail + * Recipient second name + * @return recipientSecondName */ @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; + public String getRecipientSecondName() { + return recipientSecondName; } - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; } - public Form1099Div postalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public Form1099Div address(String address) { + this.address = address; return this; } /** - * Get postalMailStatus - * @return postalMailStatus + * Address. + * @return address */ @javax.annotation.Nullable - public Form1099StatusDetail getPostalMailStatus() { - return postalMailStatus; + public String getAddress() { + return address; } - public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public void setAddress(String address) { + this.address = address; } - public Form1099Div tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public Form1099Div address2(String address2) { + this.address2 = address2; return this; } /** - * Get tinMatch - * @return tinMatch + * Address line 2. + * @return address2 */ @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; + public String getAddress2() { + return address2; } - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public void setAddress2(String address2) { + this.address2 = address2; } - public Form1099Div tinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public Form1099Div city(String city) { + this.city = city; return this; } /** - * Get tinMatchStatus - * @return tinMatchStatus + * City. + * @return city */ @javax.annotation.Nullable - public Form1099StatusDetail getTinMatchStatus() { - return tinMatchStatus; + public String getCity() { + return city; } - public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public void setCity(String city) { + this.city = city; } - public Form1099Div addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public Form1099Div state(String state) { + this.state = state; return this; } /** - * Get addressVerification - * @return addressVerification + * Two-letter US state or Canadian province code (required for US/CA addresses). + * @return state */ @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; + public String getState() { + return state; } - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public void setState(String state) { + this.state = state; } - public Form1099Div addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public Form1099Div zip(String zip) { + this.zip = zip; return this; } /** - * Get addressVerificationStatus - * @return addressVerificationStatus + * ZIP/postal code. + * @return zip */ @javax.annotation.Nullable - public Form1099StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; + public String getZip() { + return zip; } - public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public void setZip(String zip) { + this.zip = zip; } - public Form1099Div eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public Form1099Div email(String email) { + this.email = email; return this; } /** - * Get eDeliveryStatus - * @return eDeliveryStatus + * Recipient's Contact email address. + * @return email */ @javax.annotation.Nullable - public Form1099StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; + public String getEmail() { + return email; } - public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public void setEmail(String email) { + this.email = email; } - public Form1099Div referenceId(String referenceId) { - this.referenceId = referenceId; + public Form1099Div accountNumber(String accountNumber) { + this.accountNumber = accountNumber; return this; } /** - * Get referenceId - * @return referenceId + * Account number + * @return accountNumber */ @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; + public String getAccountNumber() { + return accountNumber; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; } - public Form1099Div email(String email) { - this.email = email; + public Form1099Div officeCode(String officeCode) { + this.officeCode = officeCode; return this; } /** - * Get email - * @return email + * Office code + * @return officeCode */ @javax.annotation.Nullable - public String getEmail() { - return email; + public String getOfficeCode() { + return officeCode; } - public void setEmail(String email) { - this.email = email; + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; } - public Form1099Div tinType(String tinType) { - this.tinType = tinType; + public Form1099Div nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get tinType - * @return tinType + * Province or region for non-US/CA addresses. + * @return nonUsProvince */ @javax.annotation.Nullable - public String getTinType() { - return tinType; + public String getNonUsProvince() { + return nonUsProvince; } - public void setTinType(String tinType) { - this.tinType = tinType; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } - public Form1099Div tin(String tin) { - this.tin = tin; + public Form1099Div countryCode(String countryCode) { + this.countryCode = countryCode; return this; } /** - * Get tin - * @return tin + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode */ @javax.annotation.Nullable - public String getTin() { - return tin; + public String getCountryCode() { + return countryCode; } - public void setTin(String tin) { - this.tin = tin; + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; } - public Form1099Div noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099Div federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; return this; } /** - * Get noTin - * @return noTin + * Date when federal e-filing should be scheduled for this form + * @return federalEfileDate */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public LocalDate getFederalEfileDate() { + return federalEfileDate; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; } - public Form1099Div secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public Form1099Div postalMail(Boolean postalMail) { + this.postalMail = postalMail; return this; } /** - * Get secondTinNotice - * @return secondTinNotice + * Boolean indicating that postal mailing to the recipient should be scheduled for this form + * @return postalMail */ @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; + public Boolean getPostalMail() { + return postalMail; } - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; } - public Form1099Div recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099Div stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; return this; } /** - * Get recipientName - * @return recipientName + * Date when state e-filing should be scheduled for this form + * @return stateEfileDate */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public LocalDate getStateEfileDate() { + return stateEfileDate; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; } - public Form1099Div recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public Form1099Div recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; return this; } /** - * Get recipientSecondName - * @return recipientSecondName + * Date when recipient e-delivery should be scheduled for this form + * @return recipientEdeliveryDate */ @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; } - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; } - public Form1099Div address(String address) { - this.address = address; + public Form1099Div tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; return this; } /** - * Get address - * @return address + * Boolean indicating that TIN Matching should be scheduled for this form + * @return tinMatch */ @javax.annotation.Nullable - public String getAddress() { - return address; + public Boolean getTinMatch() { + return tinMatch; } - public void setAddress(String address) { - this.address = address; + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; } - public Form1099Div address2(String address2) { - this.address2 = address2; + public Form1099Div noTin(Boolean noTin) { + this.noTin = noTin; return this; } /** - * Get address2 - * @return address2 + * No TIN indicator + * @return noTin */ @javax.annotation.Nullable - public String getAddress2() { - return address2; + public Boolean getNoTin() { + return noTin; } - public void setAddress2(String address2) { - this.address2 = address2; + public void setNoTin(Boolean noTin) { + this.noTin = noTin; } - public Form1099Div city(String city) { - this.city = city; + public Form1099Div addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * Get city - * @return city + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public String getCity() { - return city; + public Boolean getAddressVerification() { + return addressVerification; } - public void setCity(String city) { - this.city = city; + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } - public Form1099Div state(String state) { - this.state = state; + public Form1099Div stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; return this; } /** - * Get state - * @return state + * State and local withholding information + * @return stateAndLocalWithholding */ @javax.annotation.Nullable - public String getState() { - return state; + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; } - public void setState(String state) { - this.state = state; + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; } - public Form1099Div zip(String zip) { - this.zip = zip; + public Form1099Div secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; return this; } /** - * Get zip - * @return zip + * Second TIN notice + * @return secondTinNotice */ @javax.annotation.Nullable - public String getZip() { - return zip; + public Boolean getSecondTinNotice() { + return secondTinNotice; } - public void setZip(String zip) { - this.zip = zip; + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; } - public Form1099Div nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - /** - * Get nonUsProvince - * @return nonUsProvince + * Federal e-file status + * @return federalEfileStatus */ @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; } - public Form1099Div countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } /** - * Get countryCode - * @return countryCode + * State e-file status + * @return stateEfileStatus */ @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; + public List getStateEfileStatus() { + return stateEfileStatus; } - public Form1099Div accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } /** - * Get accountNumber - * @return accountNumber + * Postal mail to recipient status + * @return postalMailStatus */ @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - public Form1099Div officeCode(String officeCode) { - this.officeCode = officeCode; - return this; + /** + * TIN Match status + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; } + + /** - * Get officeCode - * @return officeCode + * Address verification status + * @return addressVerificationStatus */ @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; } - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - public Form1099Div validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; + /** + * EDelivery status + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; } - public Form1099Div addValidationErrorsItem(ValidationError validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } + /** - * Get validationErrors + * Validation errors * @return validationErrors */ @javax.annotation.Nullable @@ -1333,18 +1448,10 @@ public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - public Form1099Div createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } /** - * Get createdAt + * Date time when the record was created. * @return createdAt */ @javax.annotation.Nullable @@ -1352,18 +1459,10 @@ public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public Form1099Div updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } /** - * Get updatedAt + * Date time when the record was last updated. * @return updatedAt */ @javax.annotation.Nullable @@ -1371,28 +1470,6 @@ public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099Div stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholding getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } @@ -1424,44 +1501,45 @@ public boolean equals(Object o) { Objects.equals(this.exemptInterestDividends, form1099Div.exemptInterestDividends) && Objects.equals(this.specifiedPrivateActivityBondInterestDividends, form1099Div.specifiedPrivateActivityBondInterestDividends) && Objects.equals(this.fatcaFilingRequirement, form1099Div.fatcaFilingRequirement) && - Objects.equals(this.id, form1099Div.id) && Objects.equals(this.type, form1099Div.type) && + Objects.equals(this.id, form1099Div.id) && Objects.equals(this.issuerId, form1099Div.issuerId) && Objects.equals(this.issuerReferenceId, form1099Div.issuerReferenceId) && Objects.equals(this.issuerTin, form1099Div.issuerTin) && Objects.equals(this.taxYear, form1099Div.taxYear) && - Objects.equals(this.federalEfile, form1099Div.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099Div.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099Div.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099Div.stateEfileStatus) && - Objects.equals(this.postalMail, form1099Div.postalMail) && - Objects.equals(this.postalMailStatus, form1099Div.postalMailStatus) && - Objects.equals(this.tinMatch, form1099Div.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099Div.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099Div.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099Div.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099Div.eDeliveryStatus) && Objects.equals(this.referenceId, form1099Div.referenceId) && - Objects.equals(this.email, form1099Div.email) && - Objects.equals(this.tinType, form1099Div.tinType) && Objects.equals(this.tin, form1099Div.tin) && - Objects.equals(this.noTin, form1099Div.noTin) && - Objects.equals(this.secondTinNotice, form1099Div.secondTinNotice) && Objects.equals(this.recipientName, form1099Div.recipientName) && + Objects.equals(this.tinType, form1099Div.tinType) && Objects.equals(this.recipientSecondName, form1099Div.recipientSecondName) && Objects.equals(this.address, form1099Div.address) && Objects.equals(this.address2, form1099Div.address2) && Objects.equals(this.city, form1099Div.city) && Objects.equals(this.state, form1099Div.state) && Objects.equals(this.zip, form1099Div.zip) && - Objects.equals(this.nonUsProvince, form1099Div.nonUsProvince) && - Objects.equals(this.countryCode, form1099Div.countryCode) && + Objects.equals(this.email, form1099Div.email) && Objects.equals(this.accountNumber, form1099Div.accountNumber) && Objects.equals(this.officeCode, form1099Div.officeCode) && + Objects.equals(this.nonUsProvince, form1099Div.nonUsProvince) && + Objects.equals(this.countryCode, form1099Div.countryCode) && + Objects.equals(this.federalEfileDate, form1099Div.federalEfileDate) && + Objects.equals(this.postalMail, form1099Div.postalMail) && + Objects.equals(this.stateEfileDate, form1099Div.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099Div.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099Div.tinMatch) && + Objects.equals(this.noTin, form1099Div.noTin) && + Objects.equals(this.addressVerification, form1099Div.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099Div.stateAndLocalWithholding) && + Objects.equals(this.secondTinNotice, form1099Div.secondTinNotice) && + Objects.equals(this.federalEfileStatus, form1099Div.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099Div.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099Div.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099Div.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099Div.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099Div.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099Div.validationErrors) && Objects.equals(this.createdAt, form1099Div.createdAt) && - Objects.equals(this.updatedAt, form1099Div.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099Div.stateAndLocalWithholding); + Objects.equals(this.updatedAt, form1099Div.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1470,7 +1548,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistributions, unrecapturedSection1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistributions, unrecapturedSection1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -1503,44 +1581,45 @@ public String toString() { sb.append(" exemptInterestDividends: ").append(toIndentedString(exemptInterestDividends)).append("\n"); sb.append(" specifiedPrivateActivityBondInterestDividends: ").append(toIndentedString(specifiedPrivateActivityBondInterestDividends)).append("\n"); sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1563,48 +1642,53 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("id"); openapiFields.add("type"); + openapiFields.add("id"); openapiFields.add("issuerId"); openapiFields.add("issuerReferenceId"); openapiFields.add("issuerTin"); openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); + openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); + openapiFields.add("email"); openapiFields.add("accountNumber"); openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("secondTinNotice"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1627,15 +1711,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099Div` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099Div.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("foreignCountryOrUSPossession") != null && !jsonObj.get("foreignCountryOrUSPossession").isJsonNull()) && !jsonObj.get("foreignCountryOrUSPossession").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `foreignCountryOrUSPossession` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountryOrUSPossession").toString())); } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); } if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); @@ -1643,55 +1739,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } @@ -1710,17 +1773,58 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); @@ -1736,10 +1840,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivList.java deleted file mode 100644 index b460d2e..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivList.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1099DivListItem; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099DivList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099DivList { - public static final String SERIALIZED_NAME_FORMS = "forms"; - @SerializedName(SERIALIZED_NAME_FORMS) - private List forms; - - public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; - @SerializedName(SERIALIZED_NAME_FORM_TYPE) - private String formType; - - public Form1099DivList() { - } - - public Form1099DivList forms(List forms) { - this.forms = forms; - return this; - } - - public Form1099DivList addFormsItem(Form1099DivListItem formsItem) { - if (this.forms == null) { - this.forms = new ArrayList<>(); - } - this.forms.add(formsItem); - return this; - } - - /** - * Get forms - * @return forms - */ - @javax.annotation.Nullable - public List getForms() { - return forms; - } - - public void setForms(List forms) { - this.forms = forms; - } - - - public Form1099DivList formType(String formType) { - this.formType = formType; - return this; - } - - /** - * Get formType - * @return formType - */ - @javax.annotation.Nullable - public String getFormType() { - return formType; - } - - public void setFormType(String formType) { - this.formType = formType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099DivList form1099DivList = (Form1099DivList) o; - return Objects.equals(this.forms, form1099DivList.forms) && - Objects.equals(this.formType, form1099DivList.formType); - } - - @Override - public int hashCode() { - return Objects.hash(forms, formType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099DivList {\n"); - sb.append(" forms: ").append(toIndentedString(forms)).append("\n"); - sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("formType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099DivList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099DivList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099DivList is not found in the empty JSON string", Form1099DivList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099DivList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099DivList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("forms") != null && !jsonObj.get("forms").isJsonNull()) { - JsonArray jsonArrayforms = jsonObj.getAsJsonArray("forms"); - if (jsonArrayforms != null) { - // ensure the json data is an array - if (!jsonObj.get("forms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `forms` to be an array in the JSON string but got `%s`", jsonObj.get("forms").toString())); - } - - // validate the optional field `forms` (array) - for (int i = 0; i < jsonArrayforms.size(); i++) { - Form1099DivListItem.validateJsonElement(jsonArrayforms.get(i)); - }; - } - } - if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099DivList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099DivList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099DivList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099DivList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099DivList given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099DivList - * @throws IOException if the JSON string is invalid with respect to Form1099DivList - */ - public static Form1099DivList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099DivList.class); - } - - /** - * Convert an instance of Form1099DivList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItem.java deleted file mode 100644 index be69899..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItem.java +++ /dev/null @@ -1,1503 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099DivListItem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099DivListItem { - public static final String SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS = "totalOrdinaryDividends"; - @SerializedName(SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS) - private Double totalOrdinaryDividends; - - public static final String SERIALIZED_NAME_QUALIFIED_DIVIDENDS = "qualifiedDividends"; - @SerializedName(SERIALIZED_NAME_QUALIFIED_DIVIDENDS) - private Double qualifiedDividends; - - public static final String SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS = "totalCapitalGainDistributions"; - @SerializedName(SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS) - private Double totalCapitalGainDistributions; - - public static final String SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN = "unrecapturedSection1250Gain"; - @SerializedName(SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN) - private Double unrecapturedSection1250Gain; - - public static final String SERIALIZED_NAME_SECTION1202_GAIN = "section1202Gain"; - @SerializedName(SERIALIZED_NAME_SECTION1202_GAIN) - private Double section1202Gain; - - public static final String SERIALIZED_NAME_COLLECTIBLES_GAIN = "collectiblesGain"; - @SerializedName(SERIALIZED_NAME_COLLECTIBLES_GAIN) - private Double collectiblesGain; - - public static final String SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS = "section897OrdinaryDividends"; - @SerializedName(SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS) - private Double section897OrdinaryDividends; - - public static final String SERIALIZED_NAME_SECTION897_CAPITAL_GAIN = "section897CapitalGain"; - @SerializedName(SERIALIZED_NAME_SECTION897_CAPITAL_GAIN) - private Double section897CapitalGain; - - public static final String SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS = "nondividendDistributions"; - @SerializedName(SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS) - private Double nondividendDistributions; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_SECTION199_A_DIVIDENDS = "section199ADividends"; - @SerializedName(SERIALIZED_NAME_SECTION199_A_DIVIDENDS) - private Double section199ADividends; - - public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; - @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) - private Double investmentExpenses; - - public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; - @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) - private Double foreignTaxPaid; - - public static final String SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION = "foreignCountryOrUSPossession"; - @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION) - private String foreignCountryOrUSPossession; - - public static final String SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS = "cashLiquidationDistributions"; - @SerializedName(SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS) - private Double cashLiquidationDistributions; - - public static final String SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS = "noncashLiquidationDistributions"; - @SerializedName(SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS) - private Double noncashLiquidationDistributions; - - public static final String SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS = "exemptInterestDividends"; - @SerializedName(SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS) - private Double exemptInterestDividends; - - public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS = "specifiedPrivateActivityBondInterestDividends"; - @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS) - private Double specifiedPrivateActivityBondInterestDividends; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099DivListItem() { - } - - public Form1099DivListItem totalOrdinaryDividends(Double totalOrdinaryDividends) { - this.totalOrdinaryDividends = totalOrdinaryDividends; - return this; - } - - /** - * Total ordinary dividends - * @return totalOrdinaryDividends - */ - @javax.annotation.Nullable - public Double getTotalOrdinaryDividends() { - return totalOrdinaryDividends; - } - - public void setTotalOrdinaryDividends(Double totalOrdinaryDividends) { - this.totalOrdinaryDividends = totalOrdinaryDividends; - } - - - public Form1099DivListItem qualifiedDividends(Double qualifiedDividends) { - this.qualifiedDividends = qualifiedDividends; - return this; - } - - /** - * Qualified dividends - * @return qualifiedDividends - */ - @javax.annotation.Nullable - public Double getQualifiedDividends() { - return qualifiedDividends; - } - - public void setQualifiedDividends(Double qualifiedDividends) { - this.qualifiedDividends = qualifiedDividends; - } - - - public Form1099DivListItem totalCapitalGainDistributions(Double totalCapitalGainDistributions) { - this.totalCapitalGainDistributions = totalCapitalGainDistributions; - return this; - } - - /** - * Total capital gain distributions - * @return totalCapitalGainDistributions - */ - @javax.annotation.Nullable - public Double getTotalCapitalGainDistributions() { - return totalCapitalGainDistributions; - } - - public void setTotalCapitalGainDistributions(Double totalCapitalGainDistributions) { - this.totalCapitalGainDistributions = totalCapitalGainDistributions; - } - - - public Form1099DivListItem unrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { - this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; - return this; - } - - /** - * Unrecaptured Section 1250 gain - * @return unrecapturedSection1250Gain - */ - @javax.annotation.Nullable - public Double getUnrecapturedSection1250Gain() { - return unrecapturedSection1250Gain; - } - - public void setUnrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { - this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; - } - - - public Form1099DivListItem section1202Gain(Double section1202Gain) { - this.section1202Gain = section1202Gain; - return this; - } - - /** - * Section 1202 gain - * @return section1202Gain - */ - @javax.annotation.Nullable - public Double getSection1202Gain() { - return section1202Gain; - } - - public void setSection1202Gain(Double section1202Gain) { - this.section1202Gain = section1202Gain; - } - - - public Form1099DivListItem collectiblesGain(Double collectiblesGain) { - this.collectiblesGain = collectiblesGain; - return this; - } - - /** - * Collectibles (28%) gain - * @return collectiblesGain - */ - @javax.annotation.Nullable - public Double getCollectiblesGain() { - return collectiblesGain; - } - - public void setCollectiblesGain(Double collectiblesGain) { - this.collectiblesGain = collectiblesGain; - } - - - public Form1099DivListItem section897OrdinaryDividends(Double section897OrdinaryDividends) { - this.section897OrdinaryDividends = section897OrdinaryDividends; - return this; - } - - /** - * Section 897 ordinary dividends - * @return section897OrdinaryDividends - */ - @javax.annotation.Nullable - public Double getSection897OrdinaryDividends() { - return section897OrdinaryDividends; - } - - public void setSection897OrdinaryDividends(Double section897OrdinaryDividends) { - this.section897OrdinaryDividends = section897OrdinaryDividends; - } - - - public Form1099DivListItem section897CapitalGain(Double section897CapitalGain) { - this.section897CapitalGain = section897CapitalGain; - return this; - } - - /** - * Section 897 capital gain - * @return section897CapitalGain - */ - @javax.annotation.Nullable - public Double getSection897CapitalGain() { - return section897CapitalGain; - } - - public void setSection897CapitalGain(Double section897CapitalGain) { - this.section897CapitalGain = section897CapitalGain; - } - - - public Form1099DivListItem nondividendDistributions(Double nondividendDistributions) { - this.nondividendDistributions = nondividendDistributions; - return this; - } - - /** - * Nondividend distributions - * @return nondividendDistributions - */ - @javax.annotation.Nullable - public Double getNondividendDistributions() { - return nondividendDistributions; - } - - public void setNondividendDistributions(Double nondividendDistributions) { - this.nondividendDistributions = nondividendDistributions; - } - - - public Form1099DivListItem federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099DivListItem section199ADividends(Double section199ADividends) { - this.section199ADividends = section199ADividends; - return this; - } - - /** - * Section 199A dividends - * @return section199ADividends - */ - @javax.annotation.Nullable - public Double getSection199ADividends() { - return section199ADividends; - } - - public void setSection199ADividends(Double section199ADividends) { - this.section199ADividends = section199ADividends; - } - - - public Form1099DivListItem investmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - return this; - } - - /** - * Investment expenses - * @return investmentExpenses - */ - @javax.annotation.Nullable - public Double getInvestmentExpenses() { - return investmentExpenses; - } - - public void setInvestmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - } - - - public Form1099DivListItem foreignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - return this; - } - - /** - * Foreign tax paid - * @return foreignTaxPaid - */ - @javax.annotation.Nullable - public Double getForeignTaxPaid() { - return foreignTaxPaid; - } - - public void setForeignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - } - - - public Form1099DivListItem foreignCountryOrUSPossession(String foreignCountryOrUSPossession) { - this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; - return this; - } - - /** - * Foreign country or U.S. possession - * @return foreignCountryOrUSPossession - */ - @javax.annotation.Nullable - public String getForeignCountryOrUSPossession() { - return foreignCountryOrUSPossession; - } - - public void setForeignCountryOrUSPossession(String foreignCountryOrUSPossession) { - this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; - } - - - public Form1099DivListItem cashLiquidationDistributions(Double cashLiquidationDistributions) { - this.cashLiquidationDistributions = cashLiquidationDistributions; - return this; - } - - /** - * Cash liquidation distributions - * @return cashLiquidationDistributions - */ - @javax.annotation.Nullable - public Double getCashLiquidationDistributions() { - return cashLiquidationDistributions; - } - - public void setCashLiquidationDistributions(Double cashLiquidationDistributions) { - this.cashLiquidationDistributions = cashLiquidationDistributions; - } - - - public Form1099DivListItem noncashLiquidationDistributions(Double noncashLiquidationDistributions) { - this.noncashLiquidationDistributions = noncashLiquidationDistributions; - return this; - } - - /** - * Noncash liquidation distributions - * @return noncashLiquidationDistributions - */ - @javax.annotation.Nullable - public Double getNoncashLiquidationDistributions() { - return noncashLiquidationDistributions; - } - - public void setNoncashLiquidationDistributions(Double noncashLiquidationDistributions) { - this.noncashLiquidationDistributions = noncashLiquidationDistributions; - } - - - public Form1099DivListItem exemptInterestDividends(Double exemptInterestDividends) { - this.exemptInterestDividends = exemptInterestDividends; - return this; - } - - /** - * Exempt-interest dividends - * @return exemptInterestDividends - */ - @javax.annotation.Nullable - public Double getExemptInterestDividends() { - return exemptInterestDividends; - } - - public void setExemptInterestDividends(Double exemptInterestDividends) { - this.exemptInterestDividends = exemptInterestDividends; - } - - - public Form1099DivListItem specifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { - this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; - return this; - } - - /** - * Specified private activity bond interest dividends - * @return specifiedPrivateActivityBondInterestDividends - */ - @javax.annotation.Nullable - public Double getSpecifiedPrivateActivityBondInterestDividends() { - return specifiedPrivateActivityBondInterestDividends; - } - - public void setSpecifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { - this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; - } - - - public Form1099DivListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099DivListItem issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099DivListItem issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099DivListItem taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nonnull - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099DivListItem issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099DivListItem referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099DivListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099DivListItem recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099DivListItem tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099DivListItem recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099DivListItem address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099DivListItem address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099DivListItem city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099DivListItem state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099DivListItem zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099DivListItem email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099DivListItem accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099DivListItem officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099DivListItem nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099DivListItem countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099DivListItem federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099DivListItem postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099DivListItem stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099DivListItem tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099DivListItem noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099DivListItem secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099DivListItem addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099DivListItem stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099DivListItem form1099DivListItem = (Form1099DivListItem) o; - return Objects.equals(this.totalOrdinaryDividends, form1099DivListItem.totalOrdinaryDividends) && - Objects.equals(this.qualifiedDividends, form1099DivListItem.qualifiedDividends) && - Objects.equals(this.totalCapitalGainDistributions, form1099DivListItem.totalCapitalGainDistributions) && - Objects.equals(this.unrecapturedSection1250Gain, form1099DivListItem.unrecapturedSection1250Gain) && - Objects.equals(this.section1202Gain, form1099DivListItem.section1202Gain) && - Objects.equals(this.collectiblesGain, form1099DivListItem.collectiblesGain) && - Objects.equals(this.section897OrdinaryDividends, form1099DivListItem.section897OrdinaryDividends) && - Objects.equals(this.section897CapitalGain, form1099DivListItem.section897CapitalGain) && - Objects.equals(this.nondividendDistributions, form1099DivListItem.nondividendDistributions) && - Objects.equals(this.federalIncomeTaxWithheld, form1099DivListItem.federalIncomeTaxWithheld) && - Objects.equals(this.section199ADividends, form1099DivListItem.section199ADividends) && - Objects.equals(this.investmentExpenses, form1099DivListItem.investmentExpenses) && - Objects.equals(this.foreignTaxPaid, form1099DivListItem.foreignTaxPaid) && - Objects.equals(this.foreignCountryOrUSPossession, form1099DivListItem.foreignCountryOrUSPossession) && - Objects.equals(this.cashLiquidationDistributions, form1099DivListItem.cashLiquidationDistributions) && - Objects.equals(this.noncashLiquidationDistributions, form1099DivListItem.noncashLiquidationDistributions) && - Objects.equals(this.exemptInterestDividends, form1099DivListItem.exemptInterestDividends) && - Objects.equals(this.specifiedPrivateActivityBondInterestDividends, form1099DivListItem.specifiedPrivateActivityBondInterestDividends) && - Objects.equals(this.fatcaFilingRequirement, form1099DivListItem.fatcaFilingRequirement) && - Objects.equals(this.issuerReferenceId, form1099DivListItem.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099DivListItem.issuerTin) && - Objects.equals(this.taxYear, form1099DivListItem.taxYear) && - Objects.equals(this.issuerId, form1099DivListItem.issuerId) && - Objects.equals(this.referenceId, form1099DivListItem.referenceId) && - Objects.equals(this.recipientTin, form1099DivListItem.recipientTin) && - Objects.equals(this.recipientName, form1099DivListItem.recipientName) && - Objects.equals(this.tinType, form1099DivListItem.tinType) && - Objects.equals(this.recipientSecondName, form1099DivListItem.recipientSecondName) && - Objects.equals(this.address, form1099DivListItem.address) && - Objects.equals(this.address2, form1099DivListItem.address2) && - Objects.equals(this.city, form1099DivListItem.city) && - Objects.equals(this.state, form1099DivListItem.state) && - Objects.equals(this.zip, form1099DivListItem.zip) && - Objects.equals(this.email, form1099DivListItem.email) && - Objects.equals(this.accountNumber, form1099DivListItem.accountNumber) && - Objects.equals(this.officeCode, form1099DivListItem.officeCode) && - Objects.equals(this.nonUsProvince, form1099DivListItem.nonUsProvince) && - Objects.equals(this.countryCode, form1099DivListItem.countryCode) && - Objects.equals(this.federalEFile, form1099DivListItem.federalEFile) && - Objects.equals(this.postalMail, form1099DivListItem.postalMail) && - Objects.equals(this.stateEFile, form1099DivListItem.stateEFile) && - Objects.equals(this.tinMatch, form1099DivListItem.tinMatch) && - Objects.equals(this.noTin, form1099DivListItem.noTin) && - Objects.equals(this.secondTinNotice, form1099DivListItem.secondTinNotice) && - Objects.equals(this.addressVerification, form1099DivListItem.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099DivListItem.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistributions, unrecapturedSection1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099DivListItem {\n"); - sb.append(" totalOrdinaryDividends: ").append(toIndentedString(totalOrdinaryDividends)).append("\n"); - sb.append(" qualifiedDividends: ").append(toIndentedString(qualifiedDividends)).append("\n"); - sb.append(" totalCapitalGainDistributions: ").append(toIndentedString(totalCapitalGainDistributions)).append("\n"); - sb.append(" unrecapturedSection1250Gain: ").append(toIndentedString(unrecapturedSection1250Gain)).append("\n"); - sb.append(" section1202Gain: ").append(toIndentedString(section1202Gain)).append("\n"); - sb.append(" collectiblesGain: ").append(toIndentedString(collectiblesGain)).append("\n"); - sb.append(" section897OrdinaryDividends: ").append(toIndentedString(section897OrdinaryDividends)).append("\n"); - sb.append(" section897CapitalGain: ").append(toIndentedString(section897CapitalGain)).append("\n"); - sb.append(" nondividendDistributions: ").append(toIndentedString(nondividendDistributions)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" section199ADividends: ").append(toIndentedString(section199ADividends)).append("\n"); - sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); - sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); - sb.append(" foreignCountryOrUSPossession: ").append(toIndentedString(foreignCountryOrUSPossession)).append("\n"); - sb.append(" cashLiquidationDistributions: ").append(toIndentedString(cashLiquidationDistributions)).append("\n"); - sb.append(" noncashLiquidationDistributions: ").append(toIndentedString(noncashLiquidationDistributions)).append("\n"); - sb.append(" exemptInterestDividends: ").append(toIndentedString(exemptInterestDividends)).append("\n"); - sb.append(" specifiedPrivateActivityBondInterestDividends: ").append(toIndentedString(specifiedPrivateActivityBondInterestDividends)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("taxYear"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099DivListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099DivListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099DivListItem is not found in the empty JSON string", Form1099DivListItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099DivListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099DivListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099DivListItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("foreignCountryOrUSPossession") != null && !jsonObj.get("foreignCountryOrUSPossession").isJsonNull()) && !jsonObj.get("foreignCountryOrUSPossession").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignCountryOrUSPossession` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountryOrUSPossession").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099DivListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099DivListItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivListItem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099DivListItem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099DivListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099DivListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099DivListItem - * @throws IOException if the JSON string is invalid with respect to Form1099DivListItem - */ - public static Form1099DivListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099DivListItem.class); - } - - /** - * Convert an instance of Form1099DivListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItemResponse.java deleted file mode 100644 index cc58876..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItemResponse.java +++ /dev/null @@ -1,1738 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099DivListItemResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099DivListItemResponse { - public static final String SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS = "totalOrdinaryDividends"; - @SerializedName(SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS) - private Double totalOrdinaryDividends; - - public static final String SERIALIZED_NAME_QUALIFIED_DIVIDENDS = "qualifiedDividends"; - @SerializedName(SERIALIZED_NAME_QUALIFIED_DIVIDENDS) - private Double qualifiedDividends; - - public static final String SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS = "totalCapitalGainDistributions"; - @SerializedName(SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS) - private Double totalCapitalGainDistributions; - - public static final String SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN = "unrecapturedSection1250Gain"; - @SerializedName(SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN) - private Double unrecapturedSection1250Gain; - - public static final String SERIALIZED_NAME_SECTION1202_GAIN = "section1202Gain"; - @SerializedName(SERIALIZED_NAME_SECTION1202_GAIN) - private Double section1202Gain; - - public static final String SERIALIZED_NAME_COLLECTIBLES_GAIN = "collectiblesGain"; - @SerializedName(SERIALIZED_NAME_COLLECTIBLES_GAIN) - private Double collectiblesGain; - - public static final String SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS = "section897OrdinaryDividends"; - @SerializedName(SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS) - private Double section897OrdinaryDividends; - - public static final String SERIALIZED_NAME_SECTION897_CAPITAL_GAIN = "section897CapitalGain"; - @SerializedName(SERIALIZED_NAME_SECTION897_CAPITAL_GAIN) - private Double section897CapitalGain; - - public static final String SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS = "nondividendDistributions"; - @SerializedName(SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS) - private Double nondividendDistributions; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_SECTION199_A_DIVIDENDS = "section199ADividends"; - @SerializedName(SERIALIZED_NAME_SECTION199_A_DIVIDENDS) - private Double section199ADividends; - - public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; - @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) - private Double investmentExpenses; - - public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; - @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) - private Double foreignTaxPaid; - - public static final String SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION = "foreignCountryOrUSPossession"; - @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION) - private String foreignCountryOrUSPossession; - - public static final String SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS = "cashLiquidationDistributions"; - @SerializedName(SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS) - private Double cashLiquidationDistributions; - - public static final String SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS = "noncashLiquidationDistributions"; - @SerializedName(SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS) - private Double noncashLiquidationDistributions; - - public static final String SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS = "exemptInterestDividends"; - @SerializedName(SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS) - private Double exemptInterestDividends; - - public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS = "specifiedPrivateActivityBondInterestDividends"; - @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS) - private Double specifiedPrivateActivityBondInterestDividends; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - public Form1099DivListItemResponse() { - } - - public Form1099DivListItemResponse( - String id, - StatusDetail federalEfileStatus, - List stateEfileStatus, - StatusDetail postalMailStatus, - StatusDetail tinMatchStatus, - StatusDetail addressVerificationStatus, - StatusDetail eDeliveryStatus, - List validationErrors, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.id = id; - this.federalEfileStatus = federalEfileStatus; - this.stateEfileStatus = stateEfileStatus; - this.postalMailStatus = postalMailStatus; - this.tinMatchStatus = tinMatchStatus; - this.addressVerificationStatus = addressVerificationStatus; - this.eDeliveryStatus = eDeliveryStatus; - this.validationErrors = validationErrors; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - public Form1099DivListItemResponse totalOrdinaryDividends(Double totalOrdinaryDividends) { - this.totalOrdinaryDividends = totalOrdinaryDividends; - return this; - } - - /** - * Total ordinary dividends - * @return totalOrdinaryDividends - */ - @javax.annotation.Nullable - public Double getTotalOrdinaryDividends() { - return totalOrdinaryDividends; - } - - public void setTotalOrdinaryDividends(Double totalOrdinaryDividends) { - this.totalOrdinaryDividends = totalOrdinaryDividends; - } - - - public Form1099DivListItemResponse qualifiedDividends(Double qualifiedDividends) { - this.qualifiedDividends = qualifiedDividends; - return this; - } - - /** - * Qualified dividends - * @return qualifiedDividends - */ - @javax.annotation.Nullable - public Double getQualifiedDividends() { - return qualifiedDividends; - } - - public void setQualifiedDividends(Double qualifiedDividends) { - this.qualifiedDividends = qualifiedDividends; - } - - - public Form1099DivListItemResponse totalCapitalGainDistributions(Double totalCapitalGainDistributions) { - this.totalCapitalGainDistributions = totalCapitalGainDistributions; - return this; - } - - /** - * Total capital gain distributions - * @return totalCapitalGainDistributions - */ - @javax.annotation.Nullable - public Double getTotalCapitalGainDistributions() { - return totalCapitalGainDistributions; - } - - public void setTotalCapitalGainDistributions(Double totalCapitalGainDistributions) { - this.totalCapitalGainDistributions = totalCapitalGainDistributions; - } - - - public Form1099DivListItemResponse unrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { - this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; - return this; - } - - /** - * Unrecaptured Section 1250 gain - * @return unrecapturedSection1250Gain - */ - @javax.annotation.Nullable - public Double getUnrecapturedSection1250Gain() { - return unrecapturedSection1250Gain; - } - - public void setUnrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { - this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; - } - - - public Form1099DivListItemResponse section1202Gain(Double section1202Gain) { - this.section1202Gain = section1202Gain; - return this; - } - - /** - * Section 1202 gain - * @return section1202Gain - */ - @javax.annotation.Nullable - public Double getSection1202Gain() { - return section1202Gain; - } - - public void setSection1202Gain(Double section1202Gain) { - this.section1202Gain = section1202Gain; - } - - - public Form1099DivListItemResponse collectiblesGain(Double collectiblesGain) { - this.collectiblesGain = collectiblesGain; - return this; - } - - /** - * Collectibles (28%) gain - * @return collectiblesGain - */ - @javax.annotation.Nullable - public Double getCollectiblesGain() { - return collectiblesGain; - } - - public void setCollectiblesGain(Double collectiblesGain) { - this.collectiblesGain = collectiblesGain; - } - - - public Form1099DivListItemResponse section897OrdinaryDividends(Double section897OrdinaryDividends) { - this.section897OrdinaryDividends = section897OrdinaryDividends; - return this; - } - - /** - * Section 897 ordinary dividends - * @return section897OrdinaryDividends - */ - @javax.annotation.Nullable - public Double getSection897OrdinaryDividends() { - return section897OrdinaryDividends; - } - - public void setSection897OrdinaryDividends(Double section897OrdinaryDividends) { - this.section897OrdinaryDividends = section897OrdinaryDividends; - } - - - public Form1099DivListItemResponse section897CapitalGain(Double section897CapitalGain) { - this.section897CapitalGain = section897CapitalGain; - return this; - } - - /** - * Section 897 capital gain - * @return section897CapitalGain - */ - @javax.annotation.Nullable - public Double getSection897CapitalGain() { - return section897CapitalGain; - } - - public void setSection897CapitalGain(Double section897CapitalGain) { - this.section897CapitalGain = section897CapitalGain; - } - - - public Form1099DivListItemResponse nondividendDistributions(Double nondividendDistributions) { - this.nondividendDistributions = nondividendDistributions; - return this; - } - - /** - * Nondividend distributions - * @return nondividendDistributions - */ - @javax.annotation.Nullable - public Double getNondividendDistributions() { - return nondividendDistributions; - } - - public void setNondividendDistributions(Double nondividendDistributions) { - this.nondividendDistributions = nondividendDistributions; - } - - - public Form1099DivListItemResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099DivListItemResponse section199ADividends(Double section199ADividends) { - this.section199ADividends = section199ADividends; - return this; - } - - /** - * Section 199A dividends - * @return section199ADividends - */ - @javax.annotation.Nullable - public Double getSection199ADividends() { - return section199ADividends; - } - - public void setSection199ADividends(Double section199ADividends) { - this.section199ADividends = section199ADividends; - } - - - public Form1099DivListItemResponse investmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - return this; - } - - /** - * Investment expenses - * @return investmentExpenses - */ - @javax.annotation.Nullable - public Double getInvestmentExpenses() { - return investmentExpenses; - } - - public void setInvestmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - } - - - public Form1099DivListItemResponse foreignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - return this; - } - - /** - * Foreign tax paid - * @return foreignTaxPaid - */ - @javax.annotation.Nullable - public Double getForeignTaxPaid() { - return foreignTaxPaid; - } - - public void setForeignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - } - - - public Form1099DivListItemResponse foreignCountryOrUSPossession(String foreignCountryOrUSPossession) { - this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; - return this; - } - - /** - * Foreign country or U.S. possession - * @return foreignCountryOrUSPossession - */ - @javax.annotation.Nullable - public String getForeignCountryOrUSPossession() { - return foreignCountryOrUSPossession; - } - - public void setForeignCountryOrUSPossession(String foreignCountryOrUSPossession) { - this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; - } - - - public Form1099DivListItemResponse cashLiquidationDistributions(Double cashLiquidationDistributions) { - this.cashLiquidationDistributions = cashLiquidationDistributions; - return this; - } - - /** - * Cash liquidation distributions - * @return cashLiquidationDistributions - */ - @javax.annotation.Nullable - public Double getCashLiquidationDistributions() { - return cashLiquidationDistributions; - } - - public void setCashLiquidationDistributions(Double cashLiquidationDistributions) { - this.cashLiquidationDistributions = cashLiquidationDistributions; - } - - - public Form1099DivListItemResponse noncashLiquidationDistributions(Double noncashLiquidationDistributions) { - this.noncashLiquidationDistributions = noncashLiquidationDistributions; - return this; - } - - /** - * Noncash liquidation distributions - * @return noncashLiquidationDistributions - */ - @javax.annotation.Nullable - public Double getNoncashLiquidationDistributions() { - return noncashLiquidationDistributions; - } - - public void setNoncashLiquidationDistributions(Double noncashLiquidationDistributions) { - this.noncashLiquidationDistributions = noncashLiquidationDistributions; - } - - - public Form1099DivListItemResponse exemptInterestDividends(Double exemptInterestDividends) { - this.exemptInterestDividends = exemptInterestDividends; - return this; - } - - /** - * Exempt-interest dividends - * @return exemptInterestDividends - */ - @javax.annotation.Nullable - public Double getExemptInterestDividends() { - return exemptInterestDividends; - } - - public void setExemptInterestDividends(Double exemptInterestDividends) { - this.exemptInterestDividends = exemptInterestDividends; - } - - - public Form1099DivListItemResponse specifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { - this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; - return this; - } - - /** - * Specified private activity bond interest dividends - * @return specifiedPrivateActivityBondInterestDividends - */ - @javax.annotation.Nullable - public Double getSpecifiedPrivateActivityBondInterestDividends() { - return specifiedPrivateActivityBondInterestDividends; - } - - public void setSpecifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { - this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; - } - - - public Form1099DivListItemResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - /** - * ID of the form - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - - public Form1099DivListItemResponse type(String type) { - this.type = type; - return this; - } - - /** - * Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public Form1099DivListItemResponse issuerId(Integer issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nonnull - public Integer getIssuerId() { - return issuerId; - } - - public void setIssuerId(Integer issuerId) { - this.issuerId = issuerId; - } - - - public Form1099DivListItemResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099DivListItemResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099DivListItemResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099DivListItemResponse federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Boolean indicating that federal e-filing has been scheduled for this form - * @return federalEfile - */ - @javax.annotation.Nonnull - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - /** - * Federal e-file status - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - - - public Form1099DivListItemResponse stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - return this; - } - - /** - * Boolean indicating that state e-filing has been scheduled for this form - * @return stateEfile - */ - @javax.annotation.Nonnull - public Boolean getStateEfile() { - return stateEfile; - } - - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - } - - - /** - * State e-file status - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - - - public Form1099DivListItemResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient has been scheduled for this form - * @return postalMail - */ - @javax.annotation.Nonnull - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - /** - * Postal mail to recipient status - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - - - public Form1099DivListItemResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching has been scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nonnull - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - /** - * TIN Match status - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - - - public Form1099DivListItemResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification has been scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nonnull - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - /** - * Address verification status - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - - - /** - * EDelivery status - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - - - public Form1099DivListItemResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099DivListItemResponse email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099DivListItemResponse tinType(String tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public String getTinType() { - return tinType; - } - - public void setTinType(String tinType) { - this.tinType = tinType; - } - - - public Form1099DivListItemResponse tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Recipient Tax ID Number - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public Form1099DivListItemResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099DivListItemResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second Tin Notice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099DivListItemResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099DivListItemResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099DivListItemResponse address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099DivListItemResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099DivListItemResponse city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099DivListItemResponse state(String state) { - this.state = state; - return this; - } - - /** - * US state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099DivListItemResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099DivListItemResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099DivListItemResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099DivListItemResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account Number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099DivListItemResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office Code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - /** - * Validation errors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - - - /** - * Creation time - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - /** - * Update time - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - public Form1099DivListItemResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099DivListItemResponse form1099DivListItemResponse = (Form1099DivListItemResponse) o; - return Objects.equals(this.totalOrdinaryDividends, form1099DivListItemResponse.totalOrdinaryDividends) && - Objects.equals(this.qualifiedDividends, form1099DivListItemResponse.qualifiedDividends) && - Objects.equals(this.totalCapitalGainDistributions, form1099DivListItemResponse.totalCapitalGainDistributions) && - Objects.equals(this.unrecapturedSection1250Gain, form1099DivListItemResponse.unrecapturedSection1250Gain) && - Objects.equals(this.section1202Gain, form1099DivListItemResponse.section1202Gain) && - Objects.equals(this.collectiblesGain, form1099DivListItemResponse.collectiblesGain) && - Objects.equals(this.section897OrdinaryDividends, form1099DivListItemResponse.section897OrdinaryDividends) && - Objects.equals(this.section897CapitalGain, form1099DivListItemResponse.section897CapitalGain) && - Objects.equals(this.nondividendDistributions, form1099DivListItemResponse.nondividendDistributions) && - Objects.equals(this.federalIncomeTaxWithheld, form1099DivListItemResponse.federalIncomeTaxWithheld) && - Objects.equals(this.section199ADividends, form1099DivListItemResponse.section199ADividends) && - Objects.equals(this.investmentExpenses, form1099DivListItemResponse.investmentExpenses) && - Objects.equals(this.foreignTaxPaid, form1099DivListItemResponse.foreignTaxPaid) && - Objects.equals(this.foreignCountryOrUSPossession, form1099DivListItemResponse.foreignCountryOrUSPossession) && - Objects.equals(this.cashLiquidationDistributions, form1099DivListItemResponse.cashLiquidationDistributions) && - Objects.equals(this.noncashLiquidationDistributions, form1099DivListItemResponse.noncashLiquidationDistributions) && - Objects.equals(this.exemptInterestDividends, form1099DivListItemResponse.exemptInterestDividends) && - Objects.equals(this.specifiedPrivateActivityBondInterestDividends, form1099DivListItemResponse.specifiedPrivateActivityBondInterestDividends) && - Objects.equals(this.fatcaFilingRequirement, form1099DivListItemResponse.fatcaFilingRequirement) && - Objects.equals(this.id, form1099DivListItemResponse.id) && - Objects.equals(this.type, form1099DivListItemResponse.type) && - Objects.equals(this.issuerId, form1099DivListItemResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099DivListItemResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099DivListItemResponse.issuerTin) && - Objects.equals(this.taxYear, form1099DivListItemResponse.taxYear) && - Objects.equals(this.federalEfile, form1099DivListItemResponse.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099DivListItemResponse.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099DivListItemResponse.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099DivListItemResponse.stateEfileStatus) && - Objects.equals(this.postalMail, form1099DivListItemResponse.postalMail) && - Objects.equals(this.postalMailStatus, form1099DivListItemResponse.postalMailStatus) && - Objects.equals(this.tinMatch, form1099DivListItemResponse.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099DivListItemResponse.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099DivListItemResponse.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099DivListItemResponse.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099DivListItemResponse.eDeliveryStatus) && - Objects.equals(this.referenceId, form1099DivListItemResponse.referenceId) && - Objects.equals(this.email, form1099DivListItemResponse.email) && - Objects.equals(this.tinType, form1099DivListItemResponse.tinType) && - Objects.equals(this.tin, form1099DivListItemResponse.tin) && - Objects.equals(this.noTin, form1099DivListItemResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099DivListItemResponse.secondTinNotice) && - Objects.equals(this.recipientName, form1099DivListItemResponse.recipientName) && - Objects.equals(this.recipientSecondName, form1099DivListItemResponse.recipientSecondName) && - Objects.equals(this.address, form1099DivListItemResponse.address) && - Objects.equals(this.address2, form1099DivListItemResponse.address2) && - Objects.equals(this.city, form1099DivListItemResponse.city) && - Objects.equals(this.state, form1099DivListItemResponse.state) && - Objects.equals(this.zip, form1099DivListItemResponse.zip) && - Objects.equals(this.nonUsProvince, form1099DivListItemResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099DivListItemResponse.countryCode) && - Objects.equals(this.accountNumber, form1099DivListItemResponse.accountNumber) && - Objects.equals(this.officeCode, form1099DivListItemResponse.officeCode) && - Objects.equals(this.validationErrors, form1099DivListItemResponse.validationErrors) && - Objects.equals(this.createdAt, form1099DivListItemResponse.createdAt) && - Objects.equals(this.updatedAt, form1099DivListItemResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099DivListItemResponse.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistributions, unrecapturedSection1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099DivListItemResponse {\n"); - sb.append(" totalOrdinaryDividends: ").append(toIndentedString(totalOrdinaryDividends)).append("\n"); - sb.append(" qualifiedDividends: ").append(toIndentedString(qualifiedDividends)).append("\n"); - sb.append(" totalCapitalGainDistributions: ").append(toIndentedString(totalCapitalGainDistributions)).append("\n"); - sb.append(" unrecapturedSection1250Gain: ").append(toIndentedString(unrecapturedSection1250Gain)).append("\n"); - sb.append(" section1202Gain: ").append(toIndentedString(section1202Gain)).append("\n"); - sb.append(" collectiblesGain: ").append(toIndentedString(collectiblesGain)).append("\n"); - sb.append(" section897OrdinaryDividends: ").append(toIndentedString(section897OrdinaryDividends)).append("\n"); - sb.append(" section897CapitalGain: ").append(toIndentedString(section897CapitalGain)).append("\n"); - sb.append(" nondividendDistributions: ").append(toIndentedString(nondividendDistributions)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" section199ADividends: ").append(toIndentedString(section199ADividends)).append("\n"); - sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); - sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); - sb.append(" foreignCountryOrUSPossession: ").append(toIndentedString(foreignCountryOrUSPossession)).append("\n"); - sb.append(" cashLiquidationDistributions: ").append(toIndentedString(cashLiquidationDistributions)).append("\n"); - sb.append(" noncashLiquidationDistributions: ").append(toIndentedString(noncashLiquidationDistributions)).append("\n"); - sb.append(" exemptInterestDividends: ").append(toIndentedString(exemptInterestDividends)).append("\n"); - sb.append(" specifiedPrivateActivityBondInterestDividends: ").append(toIndentedString(specifiedPrivateActivityBondInterestDividends)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("recipientName"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("validationErrors"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("issuerId"); - openapiRequiredFields.add("federalEfile"); - openapiRequiredFields.add("stateEfile"); - openapiRequiredFields.add("postalMail"); - openapiRequiredFields.add("tinMatch"); - openapiRequiredFields.add("addressVerification"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099DivListItemResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099DivListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099DivListItemResponse is not found in the empty JSON string", Form1099DivListItemResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099DivListItemResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099DivListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099DivListItemResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("foreignCountryOrUSPossession") != null && !jsonObj.get("foreignCountryOrUSPossession").isJsonNull()) && !jsonObj.get("foreignCountryOrUSPossession").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignCountryOrUSPossession` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountryOrUSPossession").toString())); - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099DivListItemResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099DivListItemResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivListItemResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099DivListItemResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099DivListItemResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099DivListItemResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099DivListItemResponse - * @throws IOException if the JSON string is invalid with respect to Form1099DivListItemResponse - */ - public static Form1099DivListItemResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099DivListItemResponse.class); - } - - /** - * Convert an instance of Form1099DivListItemResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivRequest.java deleted file mode 100644 index 97f1bed..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivRequest.java +++ /dev/null @@ -1,1510 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099DivRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099DivRequest { - public static final String SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS = "totalOrdinaryDividends"; - @SerializedName(SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS) - private Double totalOrdinaryDividends; - - public static final String SERIALIZED_NAME_QUALIFIED_DIVIDENDS = "qualifiedDividends"; - @SerializedName(SERIALIZED_NAME_QUALIFIED_DIVIDENDS) - private Double qualifiedDividends; - - public static final String SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS = "totalCapitalGainDistributions"; - @SerializedName(SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS) - private Double totalCapitalGainDistributions; - - public static final String SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN = "unrecapturedSection1250Gain"; - @SerializedName(SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN) - private Double unrecapturedSection1250Gain; - - public static final String SERIALIZED_NAME_SECTION1202_GAIN = "section1202Gain"; - @SerializedName(SERIALIZED_NAME_SECTION1202_GAIN) - private Double section1202Gain; - - public static final String SERIALIZED_NAME_COLLECTIBLES_GAIN = "collectiblesGain"; - @SerializedName(SERIALIZED_NAME_COLLECTIBLES_GAIN) - private Double collectiblesGain; - - public static final String SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS = "section897OrdinaryDividends"; - @SerializedName(SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS) - private Double section897OrdinaryDividends; - - public static final String SERIALIZED_NAME_SECTION897_CAPITAL_GAIN = "section897CapitalGain"; - @SerializedName(SERIALIZED_NAME_SECTION897_CAPITAL_GAIN) - private Double section897CapitalGain; - - public static final String SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS = "nondividendDistributions"; - @SerializedName(SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS) - private Double nondividendDistributions; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_SECTION199_A_DIVIDENDS = "section199ADividends"; - @SerializedName(SERIALIZED_NAME_SECTION199_A_DIVIDENDS) - private Double section199ADividends; - - public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; - @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) - private Double investmentExpenses; - - public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; - @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) - private Double foreignTaxPaid; - - public static final String SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION = "foreignCountryOrUSPossession"; - @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION) - private String foreignCountryOrUSPossession; - - public static final String SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS = "cashLiquidationDistributions"; - @SerializedName(SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS) - private Double cashLiquidationDistributions; - - public static final String SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS = "noncashLiquidationDistributions"; - @SerializedName(SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS) - private Double noncashLiquidationDistributions; - - public static final String SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS = "exemptInterestDividends"; - @SerializedName(SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS) - private Double exemptInterestDividends; - - public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS = "specifiedPrivateActivityBondInterestDividends"; - @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS) - private Double specifiedPrivateActivityBondInterestDividends; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099DivRequest() { - } - - public Form1099DivRequest totalOrdinaryDividends(Double totalOrdinaryDividends) { - this.totalOrdinaryDividends = totalOrdinaryDividends; - return this; - } - - /** - * Total ordinary dividends - * @return totalOrdinaryDividends - */ - @javax.annotation.Nullable - public Double getTotalOrdinaryDividends() { - return totalOrdinaryDividends; - } - - public void setTotalOrdinaryDividends(Double totalOrdinaryDividends) { - this.totalOrdinaryDividends = totalOrdinaryDividends; - } - - - public Form1099DivRequest qualifiedDividends(Double qualifiedDividends) { - this.qualifiedDividends = qualifiedDividends; - return this; - } - - /** - * Qualified dividends - * @return qualifiedDividends - */ - @javax.annotation.Nullable - public Double getQualifiedDividends() { - return qualifiedDividends; - } - - public void setQualifiedDividends(Double qualifiedDividends) { - this.qualifiedDividends = qualifiedDividends; - } - - - public Form1099DivRequest totalCapitalGainDistributions(Double totalCapitalGainDistributions) { - this.totalCapitalGainDistributions = totalCapitalGainDistributions; - return this; - } - - /** - * Total capital gain distributions - * @return totalCapitalGainDistributions - */ - @javax.annotation.Nullable - public Double getTotalCapitalGainDistributions() { - return totalCapitalGainDistributions; - } - - public void setTotalCapitalGainDistributions(Double totalCapitalGainDistributions) { - this.totalCapitalGainDistributions = totalCapitalGainDistributions; - } - - - public Form1099DivRequest unrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { - this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; - return this; - } - - /** - * Unrecaptured Section 1250 gain - * @return unrecapturedSection1250Gain - */ - @javax.annotation.Nullable - public Double getUnrecapturedSection1250Gain() { - return unrecapturedSection1250Gain; - } - - public void setUnrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { - this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; - } - - - public Form1099DivRequest section1202Gain(Double section1202Gain) { - this.section1202Gain = section1202Gain; - return this; - } - - /** - * Section 1202 gain - * @return section1202Gain - */ - @javax.annotation.Nullable - public Double getSection1202Gain() { - return section1202Gain; - } - - public void setSection1202Gain(Double section1202Gain) { - this.section1202Gain = section1202Gain; - } - - - public Form1099DivRequest collectiblesGain(Double collectiblesGain) { - this.collectiblesGain = collectiblesGain; - return this; - } - - /** - * Collectibles (28%) gain - * @return collectiblesGain - */ - @javax.annotation.Nullable - public Double getCollectiblesGain() { - return collectiblesGain; - } - - public void setCollectiblesGain(Double collectiblesGain) { - this.collectiblesGain = collectiblesGain; - } - - - public Form1099DivRequest section897OrdinaryDividends(Double section897OrdinaryDividends) { - this.section897OrdinaryDividends = section897OrdinaryDividends; - return this; - } - - /** - * Section 897 ordinary dividends - * @return section897OrdinaryDividends - */ - @javax.annotation.Nullable - public Double getSection897OrdinaryDividends() { - return section897OrdinaryDividends; - } - - public void setSection897OrdinaryDividends(Double section897OrdinaryDividends) { - this.section897OrdinaryDividends = section897OrdinaryDividends; - } - - - public Form1099DivRequest section897CapitalGain(Double section897CapitalGain) { - this.section897CapitalGain = section897CapitalGain; - return this; - } - - /** - * Section 897 capital gain - * @return section897CapitalGain - */ - @javax.annotation.Nullable - public Double getSection897CapitalGain() { - return section897CapitalGain; - } - - public void setSection897CapitalGain(Double section897CapitalGain) { - this.section897CapitalGain = section897CapitalGain; - } - - - public Form1099DivRequest nondividendDistributions(Double nondividendDistributions) { - this.nondividendDistributions = nondividendDistributions; - return this; - } - - /** - * Nondividend distributions - * @return nondividendDistributions - */ - @javax.annotation.Nullable - public Double getNondividendDistributions() { - return nondividendDistributions; - } - - public void setNondividendDistributions(Double nondividendDistributions) { - this.nondividendDistributions = nondividendDistributions; - } - - - public Form1099DivRequest federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099DivRequest section199ADividends(Double section199ADividends) { - this.section199ADividends = section199ADividends; - return this; - } - - /** - * Section 199A dividends - * @return section199ADividends - */ - @javax.annotation.Nullable - public Double getSection199ADividends() { - return section199ADividends; - } - - public void setSection199ADividends(Double section199ADividends) { - this.section199ADividends = section199ADividends; - } - - - public Form1099DivRequest investmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - return this; - } - - /** - * Investment expenses - * @return investmentExpenses - */ - @javax.annotation.Nullable - public Double getInvestmentExpenses() { - return investmentExpenses; - } - - public void setInvestmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - } - - - public Form1099DivRequest foreignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - return this; - } - - /** - * Foreign tax paid - * @return foreignTaxPaid - */ - @javax.annotation.Nullable - public Double getForeignTaxPaid() { - return foreignTaxPaid; - } - - public void setForeignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - } - - - public Form1099DivRequest foreignCountryOrUSPossession(String foreignCountryOrUSPossession) { - this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; - return this; - } - - /** - * Foreign country or U.S. possession - * @return foreignCountryOrUSPossession - */ - @javax.annotation.Nullable - public String getForeignCountryOrUSPossession() { - return foreignCountryOrUSPossession; - } - - public void setForeignCountryOrUSPossession(String foreignCountryOrUSPossession) { - this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; - } - - - public Form1099DivRequest cashLiquidationDistributions(Double cashLiquidationDistributions) { - this.cashLiquidationDistributions = cashLiquidationDistributions; - return this; - } - - /** - * Cash liquidation distributions - * @return cashLiquidationDistributions - */ - @javax.annotation.Nullable - public Double getCashLiquidationDistributions() { - return cashLiquidationDistributions; - } - - public void setCashLiquidationDistributions(Double cashLiquidationDistributions) { - this.cashLiquidationDistributions = cashLiquidationDistributions; - } - - - public Form1099DivRequest noncashLiquidationDistributions(Double noncashLiquidationDistributions) { - this.noncashLiquidationDistributions = noncashLiquidationDistributions; - return this; - } - - /** - * Noncash liquidation distributions - * @return noncashLiquidationDistributions - */ - @javax.annotation.Nullable - public Double getNoncashLiquidationDistributions() { - return noncashLiquidationDistributions; - } - - public void setNoncashLiquidationDistributions(Double noncashLiquidationDistributions) { - this.noncashLiquidationDistributions = noncashLiquidationDistributions; - } - - - public Form1099DivRequest exemptInterestDividends(Double exemptInterestDividends) { - this.exemptInterestDividends = exemptInterestDividends; - return this; - } - - /** - * Exempt-interest dividends - * @return exemptInterestDividends - */ - @javax.annotation.Nullable - public Double getExemptInterestDividends() { - return exemptInterestDividends; - } - - public void setExemptInterestDividends(Double exemptInterestDividends) { - this.exemptInterestDividends = exemptInterestDividends; - } - - - public Form1099DivRequest specifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { - this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; - return this; - } - - /** - * Specified private activity bond interest dividends - * @return specifiedPrivateActivityBondInterestDividends - */ - @javax.annotation.Nullable - public Double getSpecifiedPrivateActivityBondInterestDividends() { - return specifiedPrivateActivityBondInterestDividends; - } - - public void setSpecifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { - this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; - } - - - public Form1099DivRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099DivRequest type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Form1099DivRequest issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099DivRequest referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099DivRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099DivRequest recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099DivRequest tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099DivRequest recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099DivRequest address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099DivRequest address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099DivRequest city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099DivRequest state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099DivRequest zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099DivRequest email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099DivRequest accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099DivRequest officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099DivRequest nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099DivRequest countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099DivRequest federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099DivRequest postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099DivRequest stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099DivRequest tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099DivRequest noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099DivRequest secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099DivRequest addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099DivRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099DivRequest form1099DivRequest = (Form1099DivRequest) o; - return Objects.equals(this.totalOrdinaryDividends, form1099DivRequest.totalOrdinaryDividends) && - Objects.equals(this.qualifiedDividends, form1099DivRequest.qualifiedDividends) && - Objects.equals(this.totalCapitalGainDistributions, form1099DivRequest.totalCapitalGainDistributions) && - Objects.equals(this.unrecapturedSection1250Gain, form1099DivRequest.unrecapturedSection1250Gain) && - Objects.equals(this.section1202Gain, form1099DivRequest.section1202Gain) && - Objects.equals(this.collectiblesGain, form1099DivRequest.collectiblesGain) && - Objects.equals(this.section897OrdinaryDividends, form1099DivRequest.section897OrdinaryDividends) && - Objects.equals(this.section897CapitalGain, form1099DivRequest.section897CapitalGain) && - Objects.equals(this.nondividendDistributions, form1099DivRequest.nondividendDistributions) && - Objects.equals(this.federalIncomeTaxWithheld, form1099DivRequest.federalIncomeTaxWithheld) && - Objects.equals(this.section199ADividends, form1099DivRequest.section199ADividends) && - Objects.equals(this.investmentExpenses, form1099DivRequest.investmentExpenses) && - Objects.equals(this.foreignTaxPaid, form1099DivRequest.foreignTaxPaid) && - Objects.equals(this.foreignCountryOrUSPossession, form1099DivRequest.foreignCountryOrUSPossession) && - Objects.equals(this.cashLiquidationDistributions, form1099DivRequest.cashLiquidationDistributions) && - Objects.equals(this.noncashLiquidationDistributions, form1099DivRequest.noncashLiquidationDistributions) && - Objects.equals(this.exemptInterestDividends, form1099DivRequest.exemptInterestDividends) && - Objects.equals(this.specifiedPrivateActivityBondInterestDividends, form1099DivRequest.specifiedPrivateActivityBondInterestDividends) && - Objects.equals(this.fatcaFilingRequirement, form1099DivRequest.fatcaFilingRequirement) && - Objects.equals(this.type, form1099DivRequest.type) && - Objects.equals(this.issuerId, form1099DivRequest.issuerId) && - Objects.equals(this.referenceId, form1099DivRequest.referenceId) && - Objects.equals(this.recipientTin, form1099DivRequest.recipientTin) && - Objects.equals(this.recipientName, form1099DivRequest.recipientName) && - Objects.equals(this.tinType, form1099DivRequest.tinType) && - Objects.equals(this.recipientSecondName, form1099DivRequest.recipientSecondName) && - Objects.equals(this.address, form1099DivRequest.address) && - Objects.equals(this.address2, form1099DivRequest.address2) && - Objects.equals(this.city, form1099DivRequest.city) && - Objects.equals(this.state, form1099DivRequest.state) && - Objects.equals(this.zip, form1099DivRequest.zip) && - Objects.equals(this.email, form1099DivRequest.email) && - Objects.equals(this.accountNumber, form1099DivRequest.accountNumber) && - Objects.equals(this.officeCode, form1099DivRequest.officeCode) && - Objects.equals(this.nonUsProvince, form1099DivRequest.nonUsProvince) && - Objects.equals(this.countryCode, form1099DivRequest.countryCode) && - Objects.equals(this.federalEFile, form1099DivRequest.federalEFile) && - Objects.equals(this.postalMail, form1099DivRequest.postalMail) && - Objects.equals(this.stateEFile, form1099DivRequest.stateEFile) && - Objects.equals(this.tinMatch, form1099DivRequest.tinMatch) && - Objects.equals(this.noTin, form1099DivRequest.noTin) && - Objects.equals(this.secondTinNotice, form1099DivRequest.secondTinNotice) && - Objects.equals(this.addressVerification, form1099DivRequest.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099DivRequest.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistributions, unrecapturedSection1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099DivRequest {\n"); - sb.append(" totalOrdinaryDividends: ").append(toIndentedString(totalOrdinaryDividends)).append("\n"); - sb.append(" qualifiedDividends: ").append(toIndentedString(qualifiedDividends)).append("\n"); - sb.append(" totalCapitalGainDistributions: ").append(toIndentedString(totalCapitalGainDistributions)).append("\n"); - sb.append(" unrecapturedSection1250Gain: ").append(toIndentedString(unrecapturedSection1250Gain)).append("\n"); - sb.append(" section1202Gain: ").append(toIndentedString(section1202Gain)).append("\n"); - sb.append(" collectiblesGain: ").append(toIndentedString(collectiblesGain)).append("\n"); - sb.append(" section897OrdinaryDividends: ").append(toIndentedString(section897OrdinaryDividends)).append("\n"); - sb.append(" section897CapitalGain: ").append(toIndentedString(section897CapitalGain)).append("\n"); - sb.append(" nondividendDistributions: ").append(toIndentedString(nondividendDistributions)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" section199ADividends: ").append(toIndentedString(section199ADividends)).append("\n"); - sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); - sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); - sb.append(" foreignCountryOrUSPossession: ").append(toIndentedString(foreignCountryOrUSPossession)).append("\n"); - sb.append(" cashLiquidationDistributions: ").append(toIndentedString(cashLiquidationDistributions)).append("\n"); - sb.append(" noncashLiquidationDistributions: ").append(toIndentedString(noncashLiquidationDistributions)).append("\n"); - sb.append(" exemptInterestDividends: ").append(toIndentedString(exemptInterestDividends)).append("\n"); - sb.append(" specifiedPrivateActivityBondInterestDividends: ").append(toIndentedString(specifiedPrivateActivityBondInterestDividends)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099DivRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099DivRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099DivRequest is not found in the empty JSON string", Form1099DivRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099DivRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099DivRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("foreignCountryOrUSPossession") != null && !jsonObj.get("foreignCountryOrUSPossession").isJsonNull()) && !jsonObj.get("foreignCountryOrUSPossession").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignCountryOrUSPossession` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountryOrUSPossession").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099DivRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099DivRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099DivRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099DivRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099DivRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099DivRequest - * @throws IOException if the JSON string is invalid with respect to Form1099DivRequest - */ - public static Form1099DivRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099DivRequest.class); - } - - /** - * Convert an instance of Form1099DivRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivResponse.java deleted file mode 100644 index 9486cf8..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivResponse.java +++ /dev/null @@ -1,1925 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099DivResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099DivResponse { - public static final String SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS = "totalOrdinaryDividends"; - @SerializedName(SERIALIZED_NAME_TOTAL_ORDINARY_DIVIDENDS) - private Double totalOrdinaryDividends; - - public static final String SERIALIZED_NAME_QUALIFIED_DIVIDENDS = "qualifiedDividends"; - @SerializedName(SERIALIZED_NAME_QUALIFIED_DIVIDENDS) - private Double qualifiedDividends; - - public static final String SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS = "totalCapitalGainDistributions"; - @SerializedName(SERIALIZED_NAME_TOTAL_CAPITAL_GAIN_DISTRIBUTIONS) - private Double totalCapitalGainDistributions; - - public static final String SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN = "unrecapturedSection1250Gain"; - @SerializedName(SERIALIZED_NAME_UNRECAPTURED_SECTION1250_GAIN) - private Double unrecapturedSection1250Gain; - - public static final String SERIALIZED_NAME_SECTION1202_GAIN = "section1202Gain"; - @SerializedName(SERIALIZED_NAME_SECTION1202_GAIN) - private Double section1202Gain; - - public static final String SERIALIZED_NAME_COLLECTIBLES_GAIN = "collectiblesGain"; - @SerializedName(SERIALIZED_NAME_COLLECTIBLES_GAIN) - private Double collectiblesGain; - - public static final String SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS = "section897OrdinaryDividends"; - @SerializedName(SERIALIZED_NAME_SECTION897_ORDINARY_DIVIDENDS) - private Double section897OrdinaryDividends; - - public static final String SERIALIZED_NAME_SECTION897_CAPITAL_GAIN = "section897CapitalGain"; - @SerializedName(SERIALIZED_NAME_SECTION897_CAPITAL_GAIN) - private Double section897CapitalGain; - - public static final String SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS = "nondividendDistributions"; - @SerializedName(SERIALIZED_NAME_NONDIVIDEND_DISTRIBUTIONS) - private Double nondividendDistributions; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_SECTION199_A_DIVIDENDS = "section199ADividends"; - @SerializedName(SERIALIZED_NAME_SECTION199_A_DIVIDENDS) - private Double section199ADividends; - - public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; - @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) - private Double investmentExpenses; - - public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; - @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) - private Double foreignTaxPaid; - - public static final String SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION = "foreignCountryOrUSPossession"; - @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY_OR_U_S_POSSESSION) - private String foreignCountryOrUSPossession; - - public static final String SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS = "cashLiquidationDistributions"; - @SerializedName(SERIALIZED_NAME_CASH_LIQUIDATION_DISTRIBUTIONS) - private Double cashLiquidationDistributions; - - public static final String SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS = "noncashLiquidationDistributions"; - @SerializedName(SERIALIZED_NAME_NONCASH_LIQUIDATION_DISTRIBUTIONS) - private Double noncashLiquidationDistributions; - - public static final String SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS = "exemptInterestDividends"; - @SerializedName(SERIALIZED_NAME_EXEMPT_INTEREST_DIVIDENDS) - private Double exemptInterestDividends; - - public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS = "specifiedPrivateActivityBondInterestDividends"; - @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST_DIVIDENDS) - private Double specifiedPrivateActivityBondInterestDividends; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - /** - * Gets or Sets tinType - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public Form1099DivResponse() { - } - - public Form1099DivResponse( - TypeEnum type - ) { - this(); - this.type = type; - } - - public Form1099DivResponse totalOrdinaryDividends(Double totalOrdinaryDividends) { - this.totalOrdinaryDividends = totalOrdinaryDividends; - return this; - } - - /** - * Get totalOrdinaryDividends - * @return totalOrdinaryDividends - */ - @javax.annotation.Nullable - public Double getTotalOrdinaryDividends() { - return totalOrdinaryDividends; - } - - public void setTotalOrdinaryDividends(Double totalOrdinaryDividends) { - this.totalOrdinaryDividends = totalOrdinaryDividends; - } - - - public Form1099DivResponse qualifiedDividends(Double qualifiedDividends) { - this.qualifiedDividends = qualifiedDividends; - return this; - } - - /** - * Get qualifiedDividends - * @return qualifiedDividends - */ - @javax.annotation.Nullable - public Double getQualifiedDividends() { - return qualifiedDividends; - } - - public void setQualifiedDividends(Double qualifiedDividends) { - this.qualifiedDividends = qualifiedDividends; - } - - - public Form1099DivResponse totalCapitalGainDistributions(Double totalCapitalGainDistributions) { - this.totalCapitalGainDistributions = totalCapitalGainDistributions; - return this; - } - - /** - * Get totalCapitalGainDistributions - * @return totalCapitalGainDistributions - */ - @javax.annotation.Nullable - public Double getTotalCapitalGainDistributions() { - return totalCapitalGainDistributions; - } - - public void setTotalCapitalGainDistributions(Double totalCapitalGainDistributions) { - this.totalCapitalGainDistributions = totalCapitalGainDistributions; - } - - - public Form1099DivResponse unrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { - this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; - return this; - } - - /** - * Get unrecapturedSection1250Gain - * @return unrecapturedSection1250Gain - */ - @javax.annotation.Nullable - public Double getUnrecapturedSection1250Gain() { - return unrecapturedSection1250Gain; - } - - public void setUnrecapturedSection1250Gain(Double unrecapturedSection1250Gain) { - this.unrecapturedSection1250Gain = unrecapturedSection1250Gain; - } - - - public Form1099DivResponse section1202Gain(Double section1202Gain) { - this.section1202Gain = section1202Gain; - return this; - } - - /** - * Get section1202Gain - * @return section1202Gain - */ - @javax.annotation.Nullable - public Double getSection1202Gain() { - return section1202Gain; - } - - public void setSection1202Gain(Double section1202Gain) { - this.section1202Gain = section1202Gain; - } - - - public Form1099DivResponse collectiblesGain(Double collectiblesGain) { - this.collectiblesGain = collectiblesGain; - return this; - } - - /** - * Get collectiblesGain - * @return collectiblesGain - */ - @javax.annotation.Nullable - public Double getCollectiblesGain() { - return collectiblesGain; - } - - public void setCollectiblesGain(Double collectiblesGain) { - this.collectiblesGain = collectiblesGain; - } - - - public Form1099DivResponse section897OrdinaryDividends(Double section897OrdinaryDividends) { - this.section897OrdinaryDividends = section897OrdinaryDividends; - return this; - } - - /** - * Get section897OrdinaryDividends - * @return section897OrdinaryDividends - */ - @javax.annotation.Nullable - public Double getSection897OrdinaryDividends() { - return section897OrdinaryDividends; - } - - public void setSection897OrdinaryDividends(Double section897OrdinaryDividends) { - this.section897OrdinaryDividends = section897OrdinaryDividends; - } - - - public Form1099DivResponse section897CapitalGain(Double section897CapitalGain) { - this.section897CapitalGain = section897CapitalGain; - return this; - } - - /** - * Get section897CapitalGain - * @return section897CapitalGain - */ - @javax.annotation.Nullable - public Double getSection897CapitalGain() { - return section897CapitalGain; - } - - public void setSection897CapitalGain(Double section897CapitalGain) { - this.section897CapitalGain = section897CapitalGain; - } - - - public Form1099DivResponse nondividendDistributions(Double nondividendDistributions) { - this.nondividendDistributions = nondividendDistributions; - return this; - } - - /** - * Get nondividendDistributions - * @return nondividendDistributions - */ - @javax.annotation.Nullable - public Double getNondividendDistributions() { - return nondividendDistributions; - } - - public void setNondividendDistributions(Double nondividendDistributions) { - this.nondividendDistributions = nondividendDistributions; - } - - - public Form1099DivResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Get federalIncomeTaxWithheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099DivResponse section199ADividends(Double section199ADividends) { - this.section199ADividends = section199ADividends; - return this; - } - - /** - * Get section199ADividends - * @return section199ADividends - */ - @javax.annotation.Nullable - public Double getSection199ADividends() { - return section199ADividends; - } - - public void setSection199ADividends(Double section199ADividends) { - this.section199ADividends = section199ADividends; - } - - - public Form1099DivResponse investmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - return this; - } - - /** - * Get investmentExpenses - * @return investmentExpenses - */ - @javax.annotation.Nullable - public Double getInvestmentExpenses() { - return investmentExpenses; - } - - public void setInvestmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - } - - - public Form1099DivResponse foreignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - return this; - } - - /** - * Get foreignTaxPaid - * @return foreignTaxPaid - */ - @javax.annotation.Nullable - public Double getForeignTaxPaid() { - return foreignTaxPaid; - } - - public void setForeignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - } - - - public Form1099DivResponse foreignCountryOrUSPossession(String foreignCountryOrUSPossession) { - this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; - return this; - } - - /** - * Get foreignCountryOrUSPossession - * @return foreignCountryOrUSPossession - */ - @javax.annotation.Nullable - public String getForeignCountryOrUSPossession() { - return foreignCountryOrUSPossession; - } - - public void setForeignCountryOrUSPossession(String foreignCountryOrUSPossession) { - this.foreignCountryOrUSPossession = foreignCountryOrUSPossession; - } - - - public Form1099DivResponse cashLiquidationDistributions(Double cashLiquidationDistributions) { - this.cashLiquidationDistributions = cashLiquidationDistributions; - return this; - } - - /** - * Get cashLiquidationDistributions - * @return cashLiquidationDistributions - */ - @javax.annotation.Nullable - public Double getCashLiquidationDistributions() { - return cashLiquidationDistributions; - } - - public void setCashLiquidationDistributions(Double cashLiquidationDistributions) { - this.cashLiquidationDistributions = cashLiquidationDistributions; - } - - - public Form1099DivResponse noncashLiquidationDistributions(Double noncashLiquidationDistributions) { - this.noncashLiquidationDistributions = noncashLiquidationDistributions; - return this; - } - - /** - * Get noncashLiquidationDistributions - * @return noncashLiquidationDistributions - */ - @javax.annotation.Nullable - public Double getNoncashLiquidationDistributions() { - return noncashLiquidationDistributions; - } - - public void setNoncashLiquidationDistributions(Double noncashLiquidationDistributions) { - this.noncashLiquidationDistributions = noncashLiquidationDistributions; - } - - - public Form1099DivResponse exemptInterestDividends(Double exemptInterestDividends) { - this.exemptInterestDividends = exemptInterestDividends; - return this; - } - - /** - * Get exemptInterestDividends - * @return exemptInterestDividends - */ - @javax.annotation.Nullable - public Double getExemptInterestDividends() { - return exemptInterestDividends; - } - - public void setExemptInterestDividends(Double exemptInterestDividends) { - this.exemptInterestDividends = exemptInterestDividends; - } - - - public Form1099DivResponse specifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { - this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; - return this; - } - - /** - * Get specifiedPrivateActivityBondInterestDividends - * @return specifiedPrivateActivityBondInterestDividends - */ - @javax.annotation.Nullable - public Double getSpecifiedPrivateActivityBondInterestDividends() { - return specifiedPrivateActivityBondInterestDividends; - } - - public void setSpecifiedPrivateActivityBondInterestDividends(Double specifiedPrivateActivityBondInterestDividends) { - this.specifiedPrivateActivityBondInterestDividends = specifiedPrivateActivityBondInterestDividends; - } - - - public Form1099DivResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Get fatcaFilingRequirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - - public Form1099DivResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Form1099DivResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099DivResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - public Form1099DivResponse tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Get tinType - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099DivResponse id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public Form1099DivResponse issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Get issuerId - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099DivResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Get issuerReferenceId - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099DivResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Get issuerTin - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099DivResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Get taxYear - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099DivResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099DivResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get recipientName - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099DivResponse recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Get recipientTin - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099DivResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Get recipientSecondName - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099DivResponse address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099DivResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Get address2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099DivResponse city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099DivResponse state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099DivResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099DivResponse email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099DivResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099DivResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Get officeCode - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099DivResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Get nonUsProvince - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099DivResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099DivResponse federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Get federalEFile - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099DivResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Get postalMail - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099DivResponse stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Get stateEFile - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099DivResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Get tinMatch - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099DivResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Get noTin - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099DivResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Get secondTinNotice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099DivResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Get addressVerification - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099DivResponse federalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - return this; - } - - /** - * Get federalEfileStatus - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - public void setFederalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - } - - - public Form1099DivResponse eDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - return this; - } - - /** - * Get eDeliveryStatus - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - } - - - public Form1099DivResponse stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099DivResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); - return this; - } - - /** - * Get stateEfileStatus - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - } - - - public Form1099DivResponse postalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - return this; - } - - /** - * Get postalMailStatus - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - public void setPostalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - } - - - public Form1099DivResponse tinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - return this; - } - - /** - * Get tinMatchStatus - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - public void setTinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - } - - - public Form1099DivResponse addressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - return this; - } - - /** - * Get addressVerificationStatus - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - } - - - public Form1099DivResponse validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1099DivResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } - - /** - * Get validationErrors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099DivResponse form1099DivResponse = (Form1099DivResponse) o; - return Objects.equals(this.totalOrdinaryDividends, form1099DivResponse.totalOrdinaryDividends) && - Objects.equals(this.qualifiedDividends, form1099DivResponse.qualifiedDividends) && - Objects.equals(this.totalCapitalGainDistributions, form1099DivResponse.totalCapitalGainDistributions) && - Objects.equals(this.unrecapturedSection1250Gain, form1099DivResponse.unrecapturedSection1250Gain) && - Objects.equals(this.section1202Gain, form1099DivResponse.section1202Gain) && - Objects.equals(this.collectiblesGain, form1099DivResponse.collectiblesGain) && - Objects.equals(this.section897OrdinaryDividends, form1099DivResponse.section897OrdinaryDividends) && - Objects.equals(this.section897CapitalGain, form1099DivResponse.section897CapitalGain) && - Objects.equals(this.nondividendDistributions, form1099DivResponse.nondividendDistributions) && - Objects.equals(this.federalIncomeTaxWithheld, form1099DivResponse.federalIncomeTaxWithheld) && - Objects.equals(this.section199ADividends, form1099DivResponse.section199ADividends) && - Objects.equals(this.investmentExpenses, form1099DivResponse.investmentExpenses) && - Objects.equals(this.foreignTaxPaid, form1099DivResponse.foreignTaxPaid) && - Objects.equals(this.foreignCountryOrUSPossession, form1099DivResponse.foreignCountryOrUSPossession) && - Objects.equals(this.cashLiquidationDistributions, form1099DivResponse.cashLiquidationDistributions) && - Objects.equals(this.noncashLiquidationDistributions, form1099DivResponse.noncashLiquidationDistributions) && - Objects.equals(this.exemptInterestDividends, form1099DivResponse.exemptInterestDividends) && - Objects.equals(this.specifiedPrivateActivityBondInterestDividends, form1099DivResponse.specifiedPrivateActivityBondInterestDividends) && - Objects.equals(this.fatcaFilingRequirement, form1099DivResponse.fatcaFilingRequirement) && - Objects.equals(this.type, form1099DivResponse.type) && - Objects.equals(this.createdAt, form1099DivResponse.createdAt) && - Objects.equals(this.updatedAt, form1099DivResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099DivResponse.stateAndLocalWithholding) && - Objects.equals(this.tinType, form1099DivResponse.tinType) && - Objects.equals(this.id, form1099DivResponse.id) && - Objects.equals(this.issuerId, form1099DivResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099DivResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099DivResponse.issuerTin) && - Objects.equals(this.taxYear, form1099DivResponse.taxYear) && - Objects.equals(this.referenceId, form1099DivResponse.referenceId) && - Objects.equals(this.recipientName, form1099DivResponse.recipientName) && - Objects.equals(this.recipientTin, form1099DivResponse.recipientTin) && - Objects.equals(this.recipientSecondName, form1099DivResponse.recipientSecondName) && - Objects.equals(this.address, form1099DivResponse.address) && - Objects.equals(this.address2, form1099DivResponse.address2) && - Objects.equals(this.city, form1099DivResponse.city) && - Objects.equals(this.state, form1099DivResponse.state) && - Objects.equals(this.zip, form1099DivResponse.zip) && - Objects.equals(this.email, form1099DivResponse.email) && - Objects.equals(this.accountNumber, form1099DivResponse.accountNumber) && - Objects.equals(this.officeCode, form1099DivResponse.officeCode) && - Objects.equals(this.nonUsProvince, form1099DivResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099DivResponse.countryCode) && - Objects.equals(this.federalEFile, form1099DivResponse.federalEFile) && - Objects.equals(this.postalMail, form1099DivResponse.postalMail) && - Objects.equals(this.stateEFile, form1099DivResponse.stateEFile) && - Objects.equals(this.tinMatch, form1099DivResponse.tinMatch) && - Objects.equals(this.noTin, form1099DivResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099DivResponse.secondTinNotice) && - Objects.equals(this.addressVerification, form1099DivResponse.addressVerification) && - Objects.equals(this.federalEfileStatus, form1099DivResponse.federalEfileStatus) && - Objects.equals(this.eDeliveryStatus, form1099DivResponse.eDeliveryStatus) && - Objects.equals(this.stateEfileStatus, form1099DivResponse.stateEfileStatus) && - Objects.equals(this.postalMailStatus, form1099DivResponse.postalMailStatus) && - Objects.equals(this.tinMatchStatus, form1099DivResponse.tinMatchStatus) && - Objects.equals(this.addressVerificationStatus, form1099DivResponse.addressVerificationStatus) && - Objects.equals(this.validationErrors, form1099DivResponse.validationErrors); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistributions, unrecapturedSection1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099DivResponse {\n"); - sb.append(" totalOrdinaryDividends: ").append(toIndentedString(totalOrdinaryDividends)).append("\n"); - sb.append(" qualifiedDividends: ").append(toIndentedString(qualifiedDividends)).append("\n"); - sb.append(" totalCapitalGainDistributions: ").append(toIndentedString(totalCapitalGainDistributions)).append("\n"); - sb.append(" unrecapturedSection1250Gain: ").append(toIndentedString(unrecapturedSection1250Gain)).append("\n"); - sb.append(" section1202Gain: ").append(toIndentedString(section1202Gain)).append("\n"); - sb.append(" collectiblesGain: ").append(toIndentedString(collectiblesGain)).append("\n"); - sb.append(" section897OrdinaryDividends: ").append(toIndentedString(section897OrdinaryDividends)).append("\n"); - sb.append(" section897CapitalGain: ").append(toIndentedString(section897CapitalGain)).append("\n"); - sb.append(" nondividendDistributions: ").append(toIndentedString(nondividendDistributions)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" section199ADividends: ").append(toIndentedString(section199ADividends)).append("\n"); - sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); - sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); - sb.append(" foreignCountryOrUSPossession: ").append(toIndentedString(foreignCountryOrUSPossession)).append("\n"); - sb.append(" cashLiquidationDistributions: ").append(toIndentedString(cashLiquidationDistributions)).append("\n"); - sb.append(" noncashLiquidationDistributions: ").append(toIndentedString(noncashLiquidationDistributions)).append("\n"); - sb.append(" exemptInterestDividends: ").append(toIndentedString(exemptInterestDividends)).append("\n"); - sb.append(" specifiedPrivateActivityBondInterestDividends: ").append(toIndentedString(specifiedPrivateActivityBondInterestDividends)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("tinType"); - openapiFields.add("id"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("referenceId"); - openapiFields.add("recipientName"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("addressVerification"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("validationErrors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099DivResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099DivResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099DivResponse is not found in the empty JSON string", Form1099DivResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099DivResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099DivResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("foreignCountryOrUSPossession") != null && !jsonObj.get("foreignCountryOrUSPossession").isJsonNull()) && !jsonObj.get("foreignCountryOrUSPossession").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignCountryOrUSPossession` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountryOrUSPossession").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099DivResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099DivResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099DivResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099DivResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099DivResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099DivResponse - * @throws IOException if the JSON string is invalid with respect to Form1099DivResponse - */ - public static Form1099DivResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099DivResponse.class); - } - - /** - * Convert an instance of Form1099DivResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java index c5ac517..70140b8 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java @@ -30,6 +30,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -121,17 +122,87 @@ public class Form1099Int { @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER) private String taxExemptBondCusipNumber; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; + public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; + @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) + private Boolean fatcaFilingRequirement; + + /** + * Form type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1099_NEC("1099-NEC"), + + _1099_MISC("1099-MISC"), + + _1099_DIV("1099-DIV"), + + _1099_R("1099-R"), + + _1099_K("1099-K"), + + _1095_B("1095-B"), + + _1042_S("1042-S"), + + _1095_C("1095-C"), + + _1099_INT("1099-INT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private String type; + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; + private String issuerId; public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) @@ -145,81 +216,79 @@ public class Form1099Int { @SerializedName(SERIALIZED_NAME_TAX_YEAR) private Integer taxYear; - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private Form1099StatusDetail postalMailStatus; + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; + /** + * Type of TIN (Tax ID Number) + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EMPTY("Empty"), + + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"); + + private String value; + + TinTypeEnum(String value) { + this.value = value; + } - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private Form1099StatusDetail tinMatchStatus; + public String getValue() { + return value; + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; + @Override + public String toString() { + return String.valueOf(value); + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private Form1099StatusDetail addressVerificationStatus; + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private Form1099StatusDetail eDeliveryStatus; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; + private TinTypeEnum tinType; public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) @@ -245,6 +314,18 @@ public class Form1099Int { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -253,13 +334,65 @@ public class Form1099Int { @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) private String countryCode; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) @@ -273,20 +406,41 @@ public class Form1099Int { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholding stateAndLocalWithholding; - public Form1099Int() { } + public Form1099Int( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + public Form1099Int interestIncome(Double interestIncome) { this.interestIncome = interestIncome; return this; } /** - * Get interestIncome + * Interest Income * @return interestIncome */ @javax.annotation.Nullable @@ -305,7 +459,7 @@ public Form1099Int earlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { } /** - * Get earlyWithdrawalPenalty + * Early Withdrawal Penalty * @return earlyWithdrawalPenalty */ @javax.annotation.Nullable @@ -324,7 +478,7 @@ public Form1099Int usSavingsBondsInterest(Double usSavingsBondsInterest) { } /** - * Get usSavingsBondsInterest + * Interest on U.S. Savings Bonds and Treasury obligations * @return usSavingsBondsInterest */ @javax.annotation.Nullable @@ -343,7 +497,7 @@ public Form1099Int federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { } /** - * Get federalIncomeTaxWithheld + * Federal income tax withheld * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable @@ -362,7 +516,7 @@ public Form1099Int investmentExpenses(Double investmentExpenses) { } /** - * Get investmentExpenses + * Investment Expenses * @return investmentExpenses */ @javax.annotation.Nullable @@ -381,7 +535,7 @@ public Form1099Int foreignTaxPaid(Double foreignTaxPaid) { } /** - * Get foreignTaxPaid + * Foreign tax paid * @return foreignTaxPaid */ @javax.annotation.Nullable @@ -400,7 +554,7 @@ public Form1099Int foreignCountry(String foreignCountry) { } /** - * Get foreignCountry + * Foreign country or U.S. possession * @return foreignCountry */ @javax.annotation.Nullable @@ -419,7 +573,7 @@ public Form1099Int taxExemptInterest(Double taxExemptInterest) { } /** - * Get taxExemptInterest + * Tax-Exempt Interest * @return taxExemptInterest */ @javax.annotation.Nullable @@ -438,7 +592,7 @@ public Form1099Int specifiedPrivateActivityBondInterest(Double specifiedPrivateA } /** - * Get specifiedPrivateActivityBondInterest + * Specified Private activity * @return specifiedPrivateActivityBondInterest */ @javax.annotation.Nullable @@ -457,7 +611,7 @@ public Form1099Int marketDiscount(Double marketDiscount) { } /** - * Get marketDiscount + * Market Discount * @return marketDiscount */ @javax.annotation.Nullable @@ -476,7 +630,7 @@ public Form1099Int bondPremium(Double bondPremium) { } /** - * Get bondPremium + * Bond Premium * @return bondPremium */ @javax.annotation.Nullable @@ -495,7 +649,7 @@ public Form1099Int bondPremiumOnTreasuryObligations(Double bondPremiumOnTreasury } /** - * Get bondPremiumOnTreasuryObligations + * Bond Premium on Treasury obligations * @return bondPremiumOnTreasuryObligations */ @javax.annotation.Nullable @@ -514,7 +668,7 @@ public Form1099Int bondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) } /** - * Get bondPremiumOnTaxExemptBond + * Bond Premium on tax exempt bond * @return bondPremiumOnTaxExemptBond */ @javax.annotation.Nullable @@ -533,7 +687,7 @@ public Form1099Int taxExemptBondCusipNumber(String taxExemptBondCusipNumber) { } /** - * Get taxExemptBondCusipNumber + * Tax exempt bond CUSIP no. * @return taxExemptBondCusipNumber */ @javax.annotation.Nullable @@ -546,59 +700,70 @@ public void setTaxExemptBondCusipNumber(String taxExemptBondCusipNumber) { } - public Form1099Int id(String id) { - this.id = id; + public Form1099Int fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; return this; } /** - * Get id - * @return id + * FATCA filing requirement + * @return fatcaFilingRequirement */ @javax.annotation.Nullable - public String getId() { - return id; + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; } - public void setId(String id) { - this.id = id; + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; } - public Form1099Int type(String type) { + public Form1099Int type(TypeEnum type) { this.type = type; return this; } /** - * Get type + * Form type * @return type */ - @javax.annotation.Nullable - public String getType() { + @javax.annotation.Nonnull + public TypeEnum getType() { return type; } - public void setType(String type) { + public void setType(TypeEnum type) { this.type = type; } - public Form1099Int issuerId(Integer issuerId) { + /** + * Form ID. Unique identifier set when the record is created. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + + public Form1099Int issuerId(String issuerId) { this.issuerId = issuerId; return this; } /** - * Get issuerId + * Issuer ID - only required when creating forms * @return issuerId */ @javax.annotation.Nullable - public Integer getIssuerId() { + public String getIssuerId() { return issuerId; } - public void setIssuerId(Integer issuerId) { + public void setIssuerId(String issuerId) { this.issuerId = issuerId; } @@ -609,7 +774,7 @@ public Form1099Int issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID - only required when creating forms * @return issuerReferenceId */ @javax.annotation.Nullable @@ -628,7 +793,7 @@ public Form1099Int issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN - readonly * @return issuerTin */ @javax.annotation.Nullable @@ -647,7 +812,7 @@ public Form1099Int taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax Year - only required when creating forms * @return taxYear */ @javax.annotation.Nullable @@ -660,580 +825,530 @@ public void setTaxYear(Integer taxYear) { } - public Form1099Int federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; + public Form1099Int referenceId(String referenceId) { + this.referenceId = referenceId; return this; } /** - * Get federalEfile - * @return federalEfile + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId */ @javax.annotation.Nullable - public Boolean getFederalEfile() { - return federalEfile; + public String getReferenceId() { + return referenceId; } - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; } - public Form1099Int federalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public Form1099Int tin(String tin) { + this.tin = tin; return this; } /** - * Get federalEfileStatus - * @return federalEfileStatus + * Recipient's Federal Tax Identification Number (TIN). + * @return tin */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { - return federalEfileStatus; + public String getTin() { + return tin; } - public void setFederalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public void setTin(String tin) { + this.tin = tin; } - public Form1099Int stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public Form1099Int recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get stateEfile - * @return stateEfile + * Recipient name + * @return recipientName */ @javax.annotation.Nullable - public Boolean getStateEfile() { - return stateEfile; + public String getRecipientName() { + return recipientName; } - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } - public Form1099Int stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099Int addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); + public Form1099Int tinType(TinTypeEnum tinType) { + this.tinType = tinType; return this; } /** - * Get stateEfileStatus - * @return stateEfileStatus + * Type of TIN (Tax ID Number) + * @return tinType */ @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; + public TinTypeEnum getTinType() { + return tinType; } - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; } - public Form1099Int postalMail(Boolean postalMail) { - this.postalMail = postalMail; + public Form1099Int recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; return this; } /** - * Get postalMail - * @return postalMail + * Recipient second name + * @return recipientSecondName */ @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; + public String getRecipientSecondName() { + return recipientSecondName; } - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; } - public Form1099Int postalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public Form1099Int address(String address) { + this.address = address; return this; } /** - * Get postalMailStatus - * @return postalMailStatus + * Address. + * @return address */ @javax.annotation.Nullable - public Form1099StatusDetail getPostalMailStatus() { - return postalMailStatus; + public String getAddress() { + return address; } - public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public void setAddress(String address) { + this.address = address; } - public Form1099Int tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public Form1099Int address2(String address2) { + this.address2 = address2; return this; } /** - * Get tinMatch - * @return tinMatch + * Address line 2. + * @return address2 */ @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; + public String getAddress2() { + return address2; } - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public void setAddress2(String address2) { + this.address2 = address2; } - public Form1099Int tinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public Form1099Int city(String city) { + this.city = city; return this; } /** - * Get tinMatchStatus - * @return tinMatchStatus + * City. + * @return city */ @javax.annotation.Nullable - public Form1099StatusDetail getTinMatchStatus() { - return tinMatchStatus; + public String getCity() { + return city; } - public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public void setCity(String city) { + this.city = city; } - public Form1099Int addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public Form1099Int state(String state) { + this.state = state; return this; } /** - * Get addressVerification - * @return addressVerification + * Two-letter US state or Canadian province code (required for US/CA addresses). + * @return state */ @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; + public String getState() { + return state; } - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public void setState(String state) { + this.state = state; } - public Form1099Int addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public Form1099Int zip(String zip) { + this.zip = zip; return this; } /** - * Get addressVerificationStatus - * @return addressVerificationStatus + * ZIP/postal code. + * @return zip */ @javax.annotation.Nullable - public Form1099StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; + public String getZip() { + return zip; } - public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public void setZip(String zip) { + this.zip = zip; } - public Form1099Int eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public Form1099Int email(String email) { + this.email = email; return this; } /** - * Get eDeliveryStatus - * @return eDeliveryStatus + * Recipient's Contact email address. + * @return email */ @javax.annotation.Nullable - public Form1099StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; + public String getEmail() { + return email; } - public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public void setEmail(String email) { + this.email = email; } - public Form1099Int referenceId(String referenceId) { - this.referenceId = referenceId; + public Form1099Int accountNumber(String accountNumber) { + this.accountNumber = accountNumber; return this; } /** - * Get referenceId - * @return referenceId + * Account number + * @return accountNumber */ @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; + public String getAccountNumber() { + return accountNumber; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; } - public Form1099Int email(String email) { - this.email = email; + public Form1099Int officeCode(String officeCode) { + this.officeCode = officeCode; return this; } /** - * Get email - * @return email + * Office code + * @return officeCode */ @javax.annotation.Nullable - public String getEmail() { - return email; + public String getOfficeCode() { + return officeCode; } - public void setEmail(String email) { - this.email = email; + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; } - public Form1099Int tinType(String tinType) { - this.tinType = tinType; + public Form1099Int nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get tinType - * @return tinType + * Province or region for non-US/CA addresses. + * @return nonUsProvince */ @javax.annotation.Nullable - public String getTinType() { - return tinType; + public String getNonUsProvince() { + return nonUsProvince; } - public void setTinType(String tinType) { - this.tinType = tinType; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } - public Form1099Int fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public Form1099Int countryCode(String countryCode) { + this.countryCode = countryCode; return this; } /** - * Get fatcaFilingRequirement - * @return fatcaFilingRequirement + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode */ @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; + public String getCountryCode() { + return countryCode; } - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; } - public Form1099Int tin(String tin) { - this.tin = tin; + public Form1099Int federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; return this; } /** - * Get tin - * @return tin + * Date when federal e-filing should be scheduled for this form + * @return federalEfileDate */ @javax.annotation.Nullable - public String getTin() { - return tin; + public LocalDate getFederalEfileDate() { + return federalEfileDate; } - public void setTin(String tin) { - this.tin = tin; + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; } - public Form1099Int noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099Int postalMail(Boolean postalMail) { + this.postalMail = postalMail; return this; } /** - * Get noTin - * @return noTin + * Boolean indicating that postal mailing to the recipient should be scheduled for this form + * @return postalMail */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getPostalMail() { + return postalMail; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; } - public Form1099Int secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public Form1099Int stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; return this; } /** - * Get secondTinNotice - * @return secondTinNotice + * Date when state e-filing should be scheduled for this form + * @return stateEfileDate */ @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; + public LocalDate getStateEfileDate() { + return stateEfileDate; } - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; } - public Form1099Int recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099Int recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; return this; } /** - * Get recipientName - * @return recipientName + * Date when recipient e-delivery should be scheduled for this form + * @return recipientEdeliveryDate */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; } - public Form1099Int recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public Form1099Int tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; return this; } /** - * Get recipientSecondName - * @return recipientSecondName + * Boolean indicating that TIN Matching should be scheduled for this form + * @return tinMatch */ @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; + public Boolean getTinMatch() { + return tinMatch; } - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; } - public Form1099Int address(String address) { - this.address = address; + public Form1099Int noTin(Boolean noTin) { + this.noTin = noTin; return this; } /** - * Get address - * @return address + * No TIN indicator + * @return noTin */ @javax.annotation.Nullable - public String getAddress() { - return address; + public Boolean getNoTin() { + return noTin; } - public void setAddress(String address) { - this.address = address; + public void setNoTin(Boolean noTin) { + this.noTin = noTin; } - public Form1099Int address2(String address2) { - this.address2 = address2; + public Form1099Int addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * Get address2 - * @return address2 + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public String getAddress2() { - return address2; + public Boolean getAddressVerification() { + return addressVerification; } - public void setAddress2(String address2) { - this.address2 = address2; + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } - public Form1099Int city(String city) { - this.city = city; + public Form1099Int stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; return this; } /** - * Get city - * @return city + * State and local withholding information + * @return stateAndLocalWithholding */ @javax.annotation.Nullable - public String getCity() { - return city; + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; } - public void setCity(String city) { - this.city = city; + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; } - public Form1099Int state(String state) { - this.state = state; + public Form1099Int secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; return this; } /** - * Get state - * @return state + * Second TIN notice + * @return secondTinNotice */ @javax.annotation.Nullable - public String getState() { - return state; + public Boolean getSecondTinNotice() { + return secondTinNotice; } - public void setState(String state) { - this.state = state; + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; } - public Form1099Int zip(String zip) { - this.zip = zip; - return this; - } - /** - * Get zip - * @return zip + * Federal e-file status + * @return federalEfileStatus */ @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; } - public Form1099Int nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } /** - * Get nonUsProvince - * @return nonUsProvince + * State e-file status + * @return stateEfileStatus */ @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; + public List getStateEfileStatus() { + return stateEfileStatus; } - public Form1099Int countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } /** - * Get countryCode - * @return countryCode + * Postal mail to recipient status + * @return postalMailStatus */ @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; } - public Form1099Int accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } /** - * Get accountNumber - * @return accountNumber + * TIN Match status + * @return tinMatchStatus */ @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - public Form1099Int officeCode(String officeCode) { - this.officeCode = officeCode; - return this; + /** + * Address verification status + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; } + + /** - * Get officeCode - * @return officeCode + * EDelivery status + * @return eDeliveryStatus */ @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; } - public Form1099Int validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1099Int addValidationErrorsItem(ValidationError validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } /** - * Get validationErrors + * Validation errors * @return validationErrors */ @javax.annotation.Nullable @@ -1241,18 +1356,10 @@ public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - public Form1099Int createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } /** - * Get createdAt + * Date time when the record was created. * @return createdAt */ @javax.annotation.Nullable @@ -1260,18 +1367,10 @@ public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public Form1099Int updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } /** - * Get updatedAt + * Date time when the record was last updated. * @return updatedAt */ @javax.annotation.Nullable @@ -1279,28 +1378,6 @@ public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099Int stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholding getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } @@ -1327,45 +1404,46 @@ public boolean equals(Object o) { Objects.equals(this.bondPremiumOnTreasuryObligations, form1099Int.bondPremiumOnTreasuryObligations) && Objects.equals(this.bondPremiumOnTaxExemptBond, form1099Int.bondPremiumOnTaxExemptBond) && Objects.equals(this.taxExemptBondCusipNumber, form1099Int.taxExemptBondCusipNumber) && - Objects.equals(this.id, form1099Int.id) && + Objects.equals(this.fatcaFilingRequirement, form1099Int.fatcaFilingRequirement) && Objects.equals(this.type, form1099Int.type) && + Objects.equals(this.id, form1099Int.id) && Objects.equals(this.issuerId, form1099Int.issuerId) && Objects.equals(this.issuerReferenceId, form1099Int.issuerReferenceId) && Objects.equals(this.issuerTin, form1099Int.issuerTin) && Objects.equals(this.taxYear, form1099Int.taxYear) && - Objects.equals(this.federalEfile, form1099Int.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099Int.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099Int.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099Int.stateEfileStatus) && - Objects.equals(this.postalMail, form1099Int.postalMail) && - Objects.equals(this.postalMailStatus, form1099Int.postalMailStatus) && - Objects.equals(this.tinMatch, form1099Int.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099Int.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099Int.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099Int.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099Int.eDeliveryStatus) && Objects.equals(this.referenceId, form1099Int.referenceId) && - Objects.equals(this.email, form1099Int.email) && - Objects.equals(this.tinType, form1099Int.tinType) && - Objects.equals(this.fatcaFilingRequirement, form1099Int.fatcaFilingRequirement) && Objects.equals(this.tin, form1099Int.tin) && - Objects.equals(this.noTin, form1099Int.noTin) && - Objects.equals(this.secondTinNotice, form1099Int.secondTinNotice) && Objects.equals(this.recipientName, form1099Int.recipientName) && + Objects.equals(this.tinType, form1099Int.tinType) && Objects.equals(this.recipientSecondName, form1099Int.recipientSecondName) && Objects.equals(this.address, form1099Int.address) && Objects.equals(this.address2, form1099Int.address2) && Objects.equals(this.city, form1099Int.city) && Objects.equals(this.state, form1099Int.state) && Objects.equals(this.zip, form1099Int.zip) && - Objects.equals(this.nonUsProvince, form1099Int.nonUsProvince) && - Objects.equals(this.countryCode, form1099Int.countryCode) && + Objects.equals(this.email, form1099Int.email) && Objects.equals(this.accountNumber, form1099Int.accountNumber) && Objects.equals(this.officeCode, form1099Int.officeCode) && + Objects.equals(this.nonUsProvince, form1099Int.nonUsProvince) && + Objects.equals(this.countryCode, form1099Int.countryCode) && + Objects.equals(this.federalEfileDate, form1099Int.federalEfileDate) && + Objects.equals(this.postalMail, form1099Int.postalMail) && + Objects.equals(this.stateEfileDate, form1099Int.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099Int.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099Int.tinMatch) && + Objects.equals(this.noTin, form1099Int.noTin) && + Objects.equals(this.addressVerification, form1099Int.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099Int.stateAndLocalWithholding) && + Objects.equals(this.secondTinNotice, form1099Int.secondTinNotice) && + Objects.equals(this.federalEfileStatus, form1099Int.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099Int.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099Int.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099Int.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099Int.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099Int.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099Int.validationErrors) && Objects.equals(this.createdAt, form1099Int.createdAt) && - Objects.equals(this.updatedAt, form1099Int.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099Int.stateAndLocalWithholding); + Objects.equals(this.updatedAt, form1099Int.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1374,7 +1452,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, fatcaFilingRequirement, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, fatcaFilingRequirement, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -1402,45 +1480,46 @@ public String toString() { sb.append(" bondPremiumOnTreasuryObligations: ").append(toIndentedString(bondPremiumOnTreasuryObligations)).append("\n"); sb.append(" bondPremiumOnTaxExemptBond: ").append(toIndentedString(bondPremiumOnTaxExemptBond)).append("\n"); sb.append(" taxExemptBondCusipNumber: ").append(toIndentedString(taxExemptBondCusipNumber)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1463,48 +1542,53 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("id"); openapiFields.add("type"); + openapiFields.add("id"); openapiFields.add("issuerId"); openapiFields.add("issuerReferenceId"); openapiFields.add("issuerTin"); openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); + openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); + openapiFields.add("email"); openapiFields.add("accountNumber"); openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("secondTinNotice"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1527,6 +1611,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099Int` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099Int.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("foreignCountry") != null && !jsonObj.get("foreignCountry").isJsonNull()) && !jsonObj.get("foreignCountry").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `foreignCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountry").toString())); @@ -1534,11 +1625,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("taxExemptBondCusipNumber") != null && !jsonObj.get("taxExemptBondCusipNumber").isJsonNull()) && !jsonObj.get("taxExemptBondCusipNumber").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `taxExemptBondCusipNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxExemptBondCusipNumber").toString())); } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); } if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); @@ -1546,55 +1642,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } @@ -1613,17 +1676,58 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); @@ -1639,10 +1743,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItem.java deleted file mode 100644 index a409996..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItem.java +++ /dev/null @@ -1,1406 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099IntListItem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099IntListItem { - public static final String SERIALIZED_NAME_INTEREST_INCOME = "interestIncome"; - @SerializedName(SERIALIZED_NAME_INTEREST_INCOME) - private Double interestIncome; - - public static final String SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY = "earlyWithdrawalPenalty"; - @SerializedName(SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY) - private Double earlyWithdrawalPenalty; - - public static final String SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST = "usSavingsBondsInterest"; - @SerializedName(SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST) - private Double usSavingsBondsInterest; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; - @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) - private Double investmentExpenses; - - public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; - @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) - private Double foreignTaxPaid; - - public static final String SERIALIZED_NAME_FOREIGN_COUNTRY = "foreignCountry"; - @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY) - private String foreignCountry; - - public static final String SERIALIZED_NAME_TAX_EXEMPT_INTEREST = "taxExemptInterest"; - @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_INTEREST) - private Double taxExemptInterest; - - public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST = "specifiedPrivateActivityBondInterest"; - @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST) - private Double specifiedPrivateActivityBondInterest; - - public static final String SERIALIZED_NAME_MARKET_DISCOUNT = "marketDiscount"; - @SerializedName(SERIALIZED_NAME_MARKET_DISCOUNT) - private Double marketDiscount; - - public static final String SERIALIZED_NAME_BOND_PREMIUM = "bondPremium"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM) - private Double bondPremium; - - public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS = "bondPremiumOnTreasuryObligations"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS) - private Double bondPremiumOnTreasuryObligations; - - public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND = "bondPremiumOnTaxExemptBond"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND) - private Double bondPremiumOnTaxExemptBond; - - public static final String SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER = "taxExemptBondCusipNumber"; - @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER) - private String taxExemptBondCusipNumber; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099IntListItem() { - } - - public Form1099IntListItem interestIncome(Double interestIncome) { - this.interestIncome = interestIncome; - return this; - } - - /** - * Interest Income - * @return interestIncome - */ - @javax.annotation.Nullable - public Double getInterestIncome() { - return interestIncome; - } - - public void setInterestIncome(Double interestIncome) { - this.interestIncome = interestIncome; - } - - - public Form1099IntListItem earlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { - this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; - return this; - } - - /** - * Early Withdrawal Penalty - * @return earlyWithdrawalPenalty - */ - @javax.annotation.Nullable - public Double getEarlyWithdrawalPenalty() { - return earlyWithdrawalPenalty; - } - - public void setEarlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { - this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; - } - - - public Form1099IntListItem usSavingsBondsInterest(Double usSavingsBondsInterest) { - this.usSavingsBondsInterest = usSavingsBondsInterest; - return this; - } - - /** - * Interest on U.S. Savings Bonds and Treasury obligations - * @return usSavingsBondsInterest - */ - @javax.annotation.Nullable - public Double getUsSavingsBondsInterest() { - return usSavingsBondsInterest; - } - - public void setUsSavingsBondsInterest(Double usSavingsBondsInterest) { - this.usSavingsBondsInterest = usSavingsBondsInterest; - } - - - public Form1099IntListItem federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099IntListItem investmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - return this; - } - - /** - * Investment Expenses - * @return investmentExpenses - */ - @javax.annotation.Nullable - public Double getInvestmentExpenses() { - return investmentExpenses; - } - - public void setInvestmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - } - - - public Form1099IntListItem foreignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - return this; - } - - /** - * Foreign tax paid - * @return foreignTaxPaid - */ - @javax.annotation.Nullable - public Double getForeignTaxPaid() { - return foreignTaxPaid; - } - - public void setForeignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - } - - - public Form1099IntListItem foreignCountry(String foreignCountry) { - this.foreignCountry = foreignCountry; - return this; - } - - /** - * Foreign country or U.S. possession - * @return foreignCountry - */ - @javax.annotation.Nullable - public String getForeignCountry() { - return foreignCountry; - } - - public void setForeignCountry(String foreignCountry) { - this.foreignCountry = foreignCountry; - } - - - public Form1099IntListItem taxExemptInterest(Double taxExemptInterest) { - this.taxExemptInterest = taxExemptInterest; - return this; - } - - /** - * Tax-Exempt Interest - * @return taxExemptInterest - */ - @javax.annotation.Nullable - public Double getTaxExemptInterest() { - return taxExemptInterest; - } - - public void setTaxExemptInterest(Double taxExemptInterest) { - this.taxExemptInterest = taxExemptInterest; - } - - - public Form1099IntListItem specifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { - this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; - return this; - } - - /** - * Specified Private activity - * @return specifiedPrivateActivityBondInterest - */ - @javax.annotation.Nullable - public Double getSpecifiedPrivateActivityBondInterest() { - return specifiedPrivateActivityBondInterest; - } - - public void setSpecifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { - this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; - } - - - public Form1099IntListItem marketDiscount(Double marketDiscount) { - this.marketDiscount = marketDiscount; - return this; - } - - /** - * Market Discount - * @return marketDiscount - */ - @javax.annotation.Nullable - public Double getMarketDiscount() { - return marketDiscount; - } - - public void setMarketDiscount(Double marketDiscount) { - this.marketDiscount = marketDiscount; - } - - - public Form1099IntListItem bondPremium(Double bondPremium) { - this.bondPremium = bondPremium; - return this; - } - - /** - * Bond Premium - * @return bondPremium - */ - @javax.annotation.Nullable - public Double getBondPremium() { - return bondPremium; - } - - public void setBondPremium(Double bondPremium) { - this.bondPremium = bondPremium; - } - - - public Form1099IntListItem bondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { - this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; - return this; - } - - /** - * Bond Premium on Treasury obligations - * @return bondPremiumOnTreasuryObligations - */ - @javax.annotation.Nullable - public Double getBondPremiumOnTreasuryObligations() { - return bondPremiumOnTreasuryObligations; - } - - public void setBondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { - this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; - } - - - public Form1099IntListItem bondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { - this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; - return this; - } - - /** - * Bond Premium on tax exempt bond - * @return bondPremiumOnTaxExemptBond - */ - @javax.annotation.Nullable - public Double getBondPremiumOnTaxExemptBond() { - return bondPremiumOnTaxExemptBond; - } - - public void setBondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { - this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; - } - - - public Form1099IntListItem taxExemptBondCusipNumber(String taxExemptBondCusipNumber) { - this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; - return this; - } - - /** - * Tax exempt bond CUSIP no. - * @return taxExemptBondCusipNumber - */ - @javax.annotation.Nullable - public String getTaxExemptBondCusipNumber() { - return taxExemptBondCusipNumber; - } - - public void setTaxExemptBondCusipNumber(String taxExemptBondCusipNumber) { - this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; - } - - - public Form1099IntListItem issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099IntListItem issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099IntListItem taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nonnull - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099IntListItem issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099IntListItem referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099IntListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099IntListItem recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099IntListItem tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099IntListItem recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099IntListItem address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099IntListItem address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099IntListItem city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099IntListItem state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099IntListItem zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099IntListItem email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099IntListItem accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099IntListItem officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099IntListItem nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099IntListItem countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099IntListItem federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099IntListItem postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099IntListItem stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099IntListItem tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099IntListItem noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099IntListItem secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099IntListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099IntListItem addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099IntListItem stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099IntListItem form1099IntListItem = (Form1099IntListItem) o; - return Objects.equals(this.interestIncome, form1099IntListItem.interestIncome) && - Objects.equals(this.earlyWithdrawalPenalty, form1099IntListItem.earlyWithdrawalPenalty) && - Objects.equals(this.usSavingsBondsInterest, form1099IntListItem.usSavingsBondsInterest) && - Objects.equals(this.federalIncomeTaxWithheld, form1099IntListItem.federalIncomeTaxWithheld) && - Objects.equals(this.investmentExpenses, form1099IntListItem.investmentExpenses) && - Objects.equals(this.foreignTaxPaid, form1099IntListItem.foreignTaxPaid) && - Objects.equals(this.foreignCountry, form1099IntListItem.foreignCountry) && - Objects.equals(this.taxExemptInterest, form1099IntListItem.taxExemptInterest) && - Objects.equals(this.specifiedPrivateActivityBondInterest, form1099IntListItem.specifiedPrivateActivityBondInterest) && - Objects.equals(this.marketDiscount, form1099IntListItem.marketDiscount) && - Objects.equals(this.bondPremium, form1099IntListItem.bondPremium) && - Objects.equals(this.bondPremiumOnTreasuryObligations, form1099IntListItem.bondPremiumOnTreasuryObligations) && - Objects.equals(this.bondPremiumOnTaxExemptBond, form1099IntListItem.bondPremiumOnTaxExemptBond) && - Objects.equals(this.taxExemptBondCusipNumber, form1099IntListItem.taxExemptBondCusipNumber) && - Objects.equals(this.issuerReferenceId, form1099IntListItem.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099IntListItem.issuerTin) && - Objects.equals(this.taxYear, form1099IntListItem.taxYear) && - Objects.equals(this.issuerId, form1099IntListItem.issuerId) && - Objects.equals(this.referenceId, form1099IntListItem.referenceId) && - Objects.equals(this.recipientTin, form1099IntListItem.recipientTin) && - Objects.equals(this.recipientName, form1099IntListItem.recipientName) && - Objects.equals(this.tinType, form1099IntListItem.tinType) && - Objects.equals(this.recipientSecondName, form1099IntListItem.recipientSecondName) && - Objects.equals(this.address, form1099IntListItem.address) && - Objects.equals(this.address2, form1099IntListItem.address2) && - Objects.equals(this.city, form1099IntListItem.city) && - Objects.equals(this.state, form1099IntListItem.state) && - Objects.equals(this.zip, form1099IntListItem.zip) && - Objects.equals(this.email, form1099IntListItem.email) && - Objects.equals(this.accountNumber, form1099IntListItem.accountNumber) && - Objects.equals(this.officeCode, form1099IntListItem.officeCode) && - Objects.equals(this.nonUsProvince, form1099IntListItem.nonUsProvince) && - Objects.equals(this.countryCode, form1099IntListItem.countryCode) && - Objects.equals(this.federalEFile, form1099IntListItem.federalEFile) && - Objects.equals(this.postalMail, form1099IntListItem.postalMail) && - Objects.equals(this.stateEFile, form1099IntListItem.stateEFile) && - Objects.equals(this.tinMatch, form1099IntListItem.tinMatch) && - Objects.equals(this.noTin, form1099IntListItem.noTin) && - Objects.equals(this.secondTinNotice, form1099IntListItem.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, form1099IntListItem.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, form1099IntListItem.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099IntListItem.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099IntListItem {\n"); - sb.append(" interestIncome: ").append(toIndentedString(interestIncome)).append("\n"); - sb.append(" earlyWithdrawalPenalty: ").append(toIndentedString(earlyWithdrawalPenalty)).append("\n"); - sb.append(" usSavingsBondsInterest: ").append(toIndentedString(usSavingsBondsInterest)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); - sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); - sb.append(" foreignCountry: ").append(toIndentedString(foreignCountry)).append("\n"); - sb.append(" taxExemptInterest: ").append(toIndentedString(taxExemptInterest)).append("\n"); - sb.append(" specifiedPrivateActivityBondInterest: ").append(toIndentedString(specifiedPrivateActivityBondInterest)).append("\n"); - sb.append(" marketDiscount: ").append(toIndentedString(marketDiscount)).append("\n"); - sb.append(" bondPremium: ").append(toIndentedString(bondPremium)).append("\n"); - sb.append(" bondPremiumOnTreasuryObligations: ").append(toIndentedString(bondPremiumOnTreasuryObligations)).append("\n"); - sb.append(" bondPremiumOnTaxExemptBond: ").append(toIndentedString(bondPremiumOnTaxExemptBond)).append("\n"); - sb.append(" taxExemptBondCusipNumber: ").append(toIndentedString(taxExemptBondCusipNumber)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("taxYear"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099IntListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099IntListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099IntListItem is not found in the empty JSON string", Form1099IntListItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099IntListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099IntListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099IntListItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("foreignCountry") != null && !jsonObj.get("foreignCountry").isJsonNull()) && !jsonObj.get("foreignCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountry").toString())); - } - if ((jsonObj.get("taxExemptBondCusipNumber") != null && !jsonObj.get("taxExemptBondCusipNumber").isJsonNull()) && !jsonObj.get("taxExemptBondCusipNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxExemptBondCusipNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxExemptBondCusipNumber").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099IntListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099IntListItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntListItem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099IntListItem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099IntListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099IntListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099IntListItem - * @throws IOException if the JSON string is invalid with respect to Form1099IntListItem - */ - public static Form1099IntListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099IntListItem.class); - } - - /** - * Convert an instance of Form1099IntListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItemResponse.java deleted file mode 100644 index 7d2661a..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntListItemResponse.java +++ /dev/null @@ -1,1641 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099IntListItemResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099IntListItemResponse { - public static final String SERIALIZED_NAME_INTEREST_INCOME = "interestIncome"; - @SerializedName(SERIALIZED_NAME_INTEREST_INCOME) - private Double interestIncome; - - public static final String SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY = "earlyWithdrawalPenalty"; - @SerializedName(SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY) - private Double earlyWithdrawalPenalty; - - public static final String SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST = "usSavingsBondsInterest"; - @SerializedName(SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST) - private Double usSavingsBondsInterest; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; - @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) - private Double investmentExpenses; - - public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; - @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) - private Double foreignTaxPaid; - - public static final String SERIALIZED_NAME_FOREIGN_COUNTRY = "foreignCountry"; - @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY) - private String foreignCountry; - - public static final String SERIALIZED_NAME_TAX_EXEMPT_INTEREST = "taxExemptInterest"; - @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_INTEREST) - private Double taxExemptInterest; - - public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST = "specifiedPrivateActivityBondInterest"; - @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST) - private Double specifiedPrivateActivityBondInterest; - - public static final String SERIALIZED_NAME_MARKET_DISCOUNT = "marketDiscount"; - @SerializedName(SERIALIZED_NAME_MARKET_DISCOUNT) - private Double marketDiscount; - - public static final String SERIALIZED_NAME_BOND_PREMIUM = "bondPremium"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM) - private Double bondPremium; - - public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS = "bondPremiumOnTreasuryObligations"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS) - private Double bondPremiumOnTreasuryObligations; - - public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND = "bondPremiumOnTaxExemptBond"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND) - private Double bondPremiumOnTaxExemptBond; - - public static final String SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER = "taxExemptBondCusipNumber"; - @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER) - private String taxExemptBondCusipNumber; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - public Form1099IntListItemResponse() { - } - - public Form1099IntListItemResponse( - String id, - StatusDetail federalEfileStatus, - List stateEfileStatus, - StatusDetail postalMailStatus, - StatusDetail tinMatchStatus, - StatusDetail addressVerificationStatus, - StatusDetail eDeliveryStatus, - List validationErrors, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.id = id; - this.federalEfileStatus = federalEfileStatus; - this.stateEfileStatus = stateEfileStatus; - this.postalMailStatus = postalMailStatus; - this.tinMatchStatus = tinMatchStatus; - this.addressVerificationStatus = addressVerificationStatus; - this.eDeliveryStatus = eDeliveryStatus; - this.validationErrors = validationErrors; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - public Form1099IntListItemResponse interestIncome(Double interestIncome) { - this.interestIncome = interestIncome; - return this; - } - - /** - * Interest Income - * @return interestIncome - */ - @javax.annotation.Nullable - public Double getInterestIncome() { - return interestIncome; - } - - public void setInterestIncome(Double interestIncome) { - this.interestIncome = interestIncome; - } - - - public Form1099IntListItemResponse earlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { - this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; - return this; - } - - /** - * Early withdrawal penalty - * @return earlyWithdrawalPenalty - */ - @javax.annotation.Nullable - public Double getEarlyWithdrawalPenalty() { - return earlyWithdrawalPenalty; - } - - public void setEarlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { - this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; - } - - - public Form1099IntListItemResponse usSavingsBondsInterest(Double usSavingsBondsInterest) { - this.usSavingsBondsInterest = usSavingsBondsInterest; - return this; - } - - /** - * Interest on U.S. Savings Bonds and Treasury obligations - * @return usSavingsBondsInterest - */ - @javax.annotation.Nullable - public Double getUsSavingsBondsInterest() { - return usSavingsBondsInterest; - } - - public void setUsSavingsBondsInterest(Double usSavingsBondsInterest) { - this.usSavingsBondsInterest = usSavingsBondsInterest; - } - - - public Form1099IntListItemResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099IntListItemResponse investmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - return this; - } - - /** - * Investment expenses - * @return investmentExpenses - */ - @javax.annotation.Nullable - public Double getInvestmentExpenses() { - return investmentExpenses; - } - - public void setInvestmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - } - - - public Form1099IntListItemResponse foreignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - return this; - } - - /** - * Foreign tax paid - * @return foreignTaxPaid - */ - @javax.annotation.Nullable - public Double getForeignTaxPaid() { - return foreignTaxPaid; - } - - public void setForeignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - } - - - public Form1099IntListItemResponse foreignCountry(String foreignCountry) { - this.foreignCountry = foreignCountry; - return this; - } - - /** - * Foreign country or U.S. possession - * @return foreignCountry - */ - @javax.annotation.Nullable - public String getForeignCountry() { - return foreignCountry; - } - - public void setForeignCountry(String foreignCountry) { - this.foreignCountry = foreignCountry; - } - - - public Form1099IntListItemResponse taxExemptInterest(Double taxExemptInterest) { - this.taxExemptInterest = taxExemptInterest; - return this; - } - - /** - * Tax-exempt interest - * @return taxExemptInterest - */ - @javax.annotation.Nullable - public Double getTaxExemptInterest() { - return taxExemptInterest; - } - - public void setTaxExemptInterest(Double taxExemptInterest) { - this.taxExemptInterest = taxExemptInterest; - } - - - public Form1099IntListItemResponse specifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { - this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; - return this; - } - - /** - * Specified private activity bond interest - * @return specifiedPrivateActivityBondInterest - */ - @javax.annotation.Nullable - public Double getSpecifiedPrivateActivityBondInterest() { - return specifiedPrivateActivityBondInterest; - } - - public void setSpecifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { - this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; - } - - - public Form1099IntListItemResponse marketDiscount(Double marketDiscount) { - this.marketDiscount = marketDiscount; - return this; - } - - /** - * Market discount - * @return marketDiscount - */ - @javax.annotation.Nullable - public Double getMarketDiscount() { - return marketDiscount; - } - - public void setMarketDiscount(Double marketDiscount) { - this.marketDiscount = marketDiscount; - } - - - public Form1099IntListItemResponse bondPremium(Double bondPremium) { - this.bondPremium = bondPremium; - return this; - } - - /** - * Bond premium - * @return bondPremium - */ - @javax.annotation.Nullable - public Double getBondPremium() { - return bondPremium; - } - - public void setBondPremium(Double bondPremium) { - this.bondPremium = bondPremium; - } - - - public Form1099IntListItemResponse bondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { - this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; - return this; - } - - /** - * Bond premium on Treasury obligations - * @return bondPremiumOnTreasuryObligations - */ - @javax.annotation.Nullable - public Double getBondPremiumOnTreasuryObligations() { - return bondPremiumOnTreasuryObligations; - } - - public void setBondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { - this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; - } - - - public Form1099IntListItemResponse bondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { - this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; - return this; - } - - /** - * Bond premium on tax exempt bond - * @return bondPremiumOnTaxExemptBond - */ - @javax.annotation.Nullable - public Double getBondPremiumOnTaxExemptBond() { - return bondPremiumOnTaxExemptBond; - } - - public void setBondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { - this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; - } - - - public Form1099IntListItemResponse taxExemptBondCusipNumber(String taxExemptBondCusipNumber) { - this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; - return this; - } - - /** - * Tax exempt bond CUSIP number - * @return taxExemptBondCusipNumber - */ - @javax.annotation.Nullable - public String getTaxExemptBondCusipNumber() { - return taxExemptBondCusipNumber; - } - - public void setTaxExemptBondCusipNumber(String taxExemptBondCusipNumber) { - this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; - } - - - /** - * ID of the form - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - - public Form1099IntListItemResponse type(String type) { - this.type = type; - return this; - } - - /** - * Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public Form1099IntListItemResponse issuerId(Integer issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nonnull - public Integer getIssuerId() { - return issuerId; - } - - public void setIssuerId(Integer issuerId) { - this.issuerId = issuerId; - } - - - public Form1099IntListItemResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099IntListItemResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099IntListItemResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099IntListItemResponse federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Boolean indicating that federal e-filing has been scheduled for this form - * @return federalEfile - */ - @javax.annotation.Nonnull - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - /** - * Federal e-file status - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - - - public Form1099IntListItemResponse stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - return this; - } - - /** - * Boolean indicating that state e-filing has been scheduled for this form - * @return stateEfile - */ - @javax.annotation.Nonnull - public Boolean getStateEfile() { - return stateEfile; - } - - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - } - - - /** - * State e-file status - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - - - public Form1099IntListItemResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient has been scheduled for this form - * @return postalMail - */ - @javax.annotation.Nonnull - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - /** - * Postal mail to recipient status - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - - - public Form1099IntListItemResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching has been scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nonnull - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - /** - * TIN Match status - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - - - public Form1099IntListItemResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification has been scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nonnull - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - /** - * Address verification status - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - - - /** - * EDelivery status - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - - - public Form1099IntListItemResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099IntListItemResponse email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099IntListItemResponse tinType(String tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public String getTinType() { - return tinType; - } - - public void setTinType(String tinType) { - this.tinType = tinType; - } - - - public Form1099IntListItemResponse tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Recipient Tax ID Number - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public Form1099IntListItemResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099IntListItemResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second Tin Notice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099IntListItemResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099IntListItemResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099IntListItemResponse address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099IntListItemResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099IntListItemResponse city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099IntListItemResponse state(String state) { - this.state = state; - return this; - } - - /** - * US state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099IntListItemResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099IntListItemResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099IntListItemResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099IntListItemResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account Number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099IntListItemResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office Code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099IntListItemResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - /** - * Validation errors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - - - /** - * Creation time - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - /** - * Update time - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - public Form1099IntListItemResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099IntListItemResponse form1099IntListItemResponse = (Form1099IntListItemResponse) o; - return Objects.equals(this.interestIncome, form1099IntListItemResponse.interestIncome) && - Objects.equals(this.earlyWithdrawalPenalty, form1099IntListItemResponse.earlyWithdrawalPenalty) && - Objects.equals(this.usSavingsBondsInterest, form1099IntListItemResponse.usSavingsBondsInterest) && - Objects.equals(this.federalIncomeTaxWithheld, form1099IntListItemResponse.federalIncomeTaxWithheld) && - Objects.equals(this.investmentExpenses, form1099IntListItemResponse.investmentExpenses) && - Objects.equals(this.foreignTaxPaid, form1099IntListItemResponse.foreignTaxPaid) && - Objects.equals(this.foreignCountry, form1099IntListItemResponse.foreignCountry) && - Objects.equals(this.taxExemptInterest, form1099IntListItemResponse.taxExemptInterest) && - Objects.equals(this.specifiedPrivateActivityBondInterest, form1099IntListItemResponse.specifiedPrivateActivityBondInterest) && - Objects.equals(this.marketDiscount, form1099IntListItemResponse.marketDiscount) && - Objects.equals(this.bondPremium, form1099IntListItemResponse.bondPremium) && - Objects.equals(this.bondPremiumOnTreasuryObligations, form1099IntListItemResponse.bondPremiumOnTreasuryObligations) && - Objects.equals(this.bondPremiumOnTaxExemptBond, form1099IntListItemResponse.bondPremiumOnTaxExemptBond) && - Objects.equals(this.taxExemptBondCusipNumber, form1099IntListItemResponse.taxExemptBondCusipNumber) && - Objects.equals(this.id, form1099IntListItemResponse.id) && - Objects.equals(this.type, form1099IntListItemResponse.type) && - Objects.equals(this.issuerId, form1099IntListItemResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099IntListItemResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099IntListItemResponse.issuerTin) && - Objects.equals(this.taxYear, form1099IntListItemResponse.taxYear) && - Objects.equals(this.federalEfile, form1099IntListItemResponse.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099IntListItemResponse.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099IntListItemResponse.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099IntListItemResponse.stateEfileStatus) && - Objects.equals(this.postalMail, form1099IntListItemResponse.postalMail) && - Objects.equals(this.postalMailStatus, form1099IntListItemResponse.postalMailStatus) && - Objects.equals(this.tinMatch, form1099IntListItemResponse.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099IntListItemResponse.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099IntListItemResponse.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099IntListItemResponse.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099IntListItemResponse.eDeliveryStatus) && - Objects.equals(this.referenceId, form1099IntListItemResponse.referenceId) && - Objects.equals(this.email, form1099IntListItemResponse.email) && - Objects.equals(this.tinType, form1099IntListItemResponse.tinType) && - Objects.equals(this.tin, form1099IntListItemResponse.tin) && - Objects.equals(this.noTin, form1099IntListItemResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099IntListItemResponse.secondTinNotice) && - Objects.equals(this.recipientName, form1099IntListItemResponse.recipientName) && - Objects.equals(this.recipientSecondName, form1099IntListItemResponse.recipientSecondName) && - Objects.equals(this.address, form1099IntListItemResponse.address) && - Objects.equals(this.address2, form1099IntListItemResponse.address2) && - Objects.equals(this.city, form1099IntListItemResponse.city) && - Objects.equals(this.state, form1099IntListItemResponse.state) && - Objects.equals(this.zip, form1099IntListItemResponse.zip) && - Objects.equals(this.nonUsProvince, form1099IntListItemResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099IntListItemResponse.countryCode) && - Objects.equals(this.accountNumber, form1099IntListItemResponse.accountNumber) && - Objects.equals(this.officeCode, form1099IntListItemResponse.officeCode) && - Objects.equals(this.fatcaFilingRequirement, form1099IntListItemResponse.fatcaFilingRequirement) && - Objects.equals(this.validationErrors, form1099IntListItemResponse.validationErrors) && - Objects.equals(this.createdAt, form1099IntListItemResponse.createdAt) && - Objects.equals(this.updatedAt, form1099IntListItemResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099IntListItemResponse.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, fatcaFilingRequirement, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099IntListItemResponse {\n"); - sb.append(" interestIncome: ").append(toIndentedString(interestIncome)).append("\n"); - sb.append(" earlyWithdrawalPenalty: ").append(toIndentedString(earlyWithdrawalPenalty)).append("\n"); - sb.append(" usSavingsBondsInterest: ").append(toIndentedString(usSavingsBondsInterest)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); - sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); - sb.append(" foreignCountry: ").append(toIndentedString(foreignCountry)).append("\n"); - sb.append(" taxExemptInterest: ").append(toIndentedString(taxExemptInterest)).append("\n"); - sb.append(" specifiedPrivateActivityBondInterest: ").append(toIndentedString(specifiedPrivateActivityBondInterest)).append("\n"); - sb.append(" marketDiscount: ").append(toIndentedString(marketDiscount)).append("\n"); - sb.append(" bondPremium: ").append(toIndentedString(bondPremium)).append("\n"); - sb.append(" bondPremiumOnTreasuryObligations: ").append(toIndentedString(bondPremiumOnTreasuryObligations)).append("\n"); - sb.append(" bondPremiumOnTaxExemptBond: ").append(toIndentedString(bondPremiumOnTaxExemptBond)).append("\n"); - sb.append(" taxExemptBondCusipNumber: ").append(toIndentedString(taxExemptBondCusipNumber)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("recipientName"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("validationErrors"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("issuerId"); - openapiRequiredFields.add("federalEfile"); - openapiRequiredFields.add("stateEfile"); - openapiRequiredFields.add("postalMail"); - openapiRequiredFields.add("tinMatch"); - openapiRequiredFields.add("addressVerification"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099IntListItemResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099IntListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099IntListItemResponse is not found in the empty JSON string", Form1099IntListItemResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099IntListItemResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099IntListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099IntListItemResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("foreignCountry") != null && !jsonObj.get("foreignCountry").isJsonNull()) && !jsonObj.get("foreignCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountry").toString())); - } - if ((jsonObj.get("taxExemptBondCusipNumber") != null && !jsonObj.get("taxExemptBondCusipNumber").isJsonNull()) && !jsonObj.get("taxExemptBondCusipNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxExemptBondCusipNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxExemptBondCusipNumber").toString())); - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099IntListItemResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099IntListItemResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntListItemResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099IntListItemResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099IntListItemResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099IntListItemResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099IntListItemResponse - * @throws IOException if the JSON string is invalid with respect to Form1099IntListItemResponse - */ - public static Form1099IntListItemResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099IntListItemResponse.class); - } - - /** - * Convert an instance of Form1099IntListItemResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntRequest.java deleted file mode 100644 index 68e72b5..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntRequest.java +++ /dev/null @@ -1,1413 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099IntRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099IntRequest { - public static final String SERIALIZED_NAME_INTEREST_INCOME = "interestIncome"; - @SerializedName(SERIALIZED_NAME_INTEREST_INCOME) - private Double interestIncome; - - public static final String SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY = "earlyWithdrawalPenalty"; - @SerializedName(SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY) - private Double earlyWithdrawalPenalty; - - public static final String SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST = "usSavingsBondsInterest"; - @SerializedName(SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST) - private Double usSavingsBondsInterest; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; - @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) - private Double investmentExpenses; - - public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; - @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) - private Double foreignTaxPaid; - - public static final String SERIALIZED_NAME_FOREIGN_COUNTRY = "foreignCountry"; - @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY) - private String foreignCountry; - - public static final String SERIALIZED_NAME_TAX_EXEMPT_INTEREST = "taxExemptInterest"; - @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_INTEREST) - private Double taxExemptInterest; - - public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST = "specifiedPrivateActivityBondInterest"; - @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST) - private Double specifiedPrivateActivityBondInterest; - - public static final String SERIALIZED_NAME_MARKET_DISCOUNT = "marketDiscount"; - @SerializedName(SERIALIZED_NAME_MARKET_DISCOUNT) - private Double marketDiscount; - - public static final String SERIALIZED_NAME_BOND_PREMIUM = "bondPremium"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM) - private Double bondPremium; - - public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS = "bondPremiumOnTreasuryObligations"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS) - private Double bondPremiumOnTreasuryObligations; - - public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND = "bondPremiumOnTaxExemptBond"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND) - private Double bondPremiumOnTaxExemptBond; - - public static final String SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER = "taxExemptBondCusipNumber"; - @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER) - private String taxExemptBondCusipNumber; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099IntRequest() { - } - - public Form1099IntRequest interestIncome(Double interestIncome) { - this.interestIncome = interestIncome; - return this; - } - - /** - * Interest Income - * @return interestIncome - */ - @javax.annotation.Nullable - public Double getInterestIncome() { - return interestIncome; - } - - public void setInterestIncome(Double interestIncome) { - this.interestIncome = interestIncome; - } - - - public Form1099IntRequest earlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { - this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; - return this; - } - - /** - * Early Withdrawl Penalty - * @return earlyWithdrawalPenalty - */ - @javax.annotation.Nullable - public Double getEarlyWithdrawalPenalty() { - return earlyWithdrawalPenalty; - } - - public void setEarlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { - this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; - } - - - public Form1099IntRequest usSavingsBondsInterest(Double usSavingsBondsInterest) { - this.usSavingsBondsInterest = usSavingsBondsInterest; - return this; - } - - /** - * Interest on U.S. Savings Bonds and Treasury obligations - * @return usSavingsBondsInterest - */ - @javax.annotation.Nullable - public Double getUsSavingsBondsInterest() { - return usSavingsBondsInterest; - } - - public void setUsSavingsBondsInterest(Double usSavingsBondsInterest) { - this.usSavingsBondsInterest = usSavingsBondsInterest; - } - - - public Form1099IntRequest federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099IntRequest investmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - return this; - } - - /** - * Investment Expenses - * @return investmentExpenses - */ - @javax.annotation.Nullable - public Double getInvestmentExpenses() { - return investmentExpenses; - } - - public void setInvestmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - } - - - public Form1099IntRequest foreignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - return this; - } - - /** - * Foreign tax paid - * @return foreignTaxPaid - */ - @javax.annotation.Nullable - public Double getForeignTaxPaid() { - return foreignTaxPaid; - } - - public void setForeignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - } - - - public Form1099IntRequest foreignCountry(String foreignCountry) { - this.foreignCountry = foreignCountry; - return this; - } - - /** - * Foreign country or U.S. possession - * @return foreignCountry - */ - @javax.annotation.Nullable - public String getForeignCountry() { - return foreignCountry; - } - - public void setForeignCountry(String foreignCountry) { - this.foreignCountry = foreignCountry; - } - - - public Form1099IntRequest taxExemptInterest(Double taxExemptInterest) { - this.taxExemptInterest = taxExemptInterest; - return this; - } - - /** - * Tax-Exempt Interest - * @return taxExemptInterest - */ - @javax.annotation.Nullable - public Double getTaxExemptInterest() { - return taxExemptInterest; - } - - public void setTaxExemptInterest(Double taxExemptInterest) { - this.taxExemptInterest = taxExemptInterest; - } - - - public Form1099IntRequest specifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { - this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; - return this; - } - - /** - * Specified Private activity - * @return specifiedPrivateActivityBondInterest - */ - @javax.annotation.Nullable - public Double getSpecifiedPrivateActivityBondInterest() { - return specifiedPrivateActivityBondInterest; - } - - public void setSpecifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { - this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; - } - - - public Form1099IntRequest marketDiscount(Double marketDiscount) { - this.marketDiscount = marketDiscount; - return this; - } - - /** - * Market Discount - * @return marketDiscount - */ - @javax.annotation.Nullable - public Double getMarketDiscount() { - return marketDiscount; - } - - public void setMarketDiscount(Double marketDiscount) { - this.marketDiscount = marketDiscount; - } - - - public Form1099IntRequest bondPremium(Double bondPremium) { - this.bondPremium = bondPremium; - return this; - } - - /** - * Bond Premium - * @return bondPremium - */ - @javax.annotation.Nullable - public Double getBondPremium() { - return bondPremium; - } - - public void setBondPremium(Double bondPremium) { - this.bondPremium = bondPremium; - } - - - public Form1099IntRequest bondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { - this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; - return this; - } - - /** - * Bond Premium on Treasury obligations - * @return bondPremiumOnTreasuryObligations - */ - @javax.annotation.Nullable - public Double getBondPremiumOnTreasuryObligations() { - return bondPremiumOnTreasuryObligations; - } - - public void setBondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { - this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; - } - - - public Form1099IntRequest bondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { - this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; - return this; - } - - /** - * Bond Premium on tax exempt bond - * @return bondPremiumOnTaxExemptBond - */ - @javax.annotation.Nullable - public Double getBondPremiumOnTaxExemptBond() { - return bondPremiumOnTaxExemptBond; - } - - public void setBondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { - this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; - } - - - public Form1099IntRequest taxExemptBondCusipNumber(String taxExemptBondCusipNumber) { - this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; - return this; - } - - /** - * Tax exempt bond CUSIP no. - * @return taxExemptBondCusipNumber - */ - @javax.annotation.Nullable - public String getTaxExemptBondCusipNumber() { - return taxExemptBondCusipNumber; - } - - public void setTaxExemptBondCusipNumber(String taxExemptBondCusipNumber) { - this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; - } - - - public Form1099IntRequest type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Form1099IntRequest issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099IntRequest referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099IntRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099IntRequest recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099IntRequest tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099IntRequest recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099IntRequest address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099IntRequest address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099IntRequest city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099IntRequest state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099IntRequest zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099IntRequest email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099IntRequest accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099IntRequest officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099IntRequest nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099IntRequest countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099IntRequest federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099IntRequest postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099IntRequest stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099IntRequest tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099IntRequest noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099IntRequest secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099IntRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099IntRequest addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099IntRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099IntRequest form1099IntRequest = (Form1099IntRequest) o; - return Objects.equals(this.interestIncome, form1099IntRequest.interestIncome) && - Objects.equals(this.earlyWithdrawalPenalty, form1099IntRequest.earlyWithdrawalPenalty) && - Objects.equals(this.usSavingsBondsInterest, form1099IntRequest.usSavingsBondsInterest) && - Objects.equals(this.federalIncomeTaxWithheld, form1099IntRequest.federalIncomeTaxWithheld) && - Objects.equals(this.investmentExpenses, form1099IntRequest.investmentExpenses) && - Objects.equals(this.foreignTaxPaid, form1099IntRequest.foreignTaxPaid) && - Objects.equals(this.foreignCountry, form1099IntRequest.foreignCountry) && - Objects.equals(this.taxExemptInterest, form1099IntRequest.taxExemptInterest) && - Objects.equals(this.specifiedPrivateActivityBondInterest, form1099IntRequest.specifiedPrivateActivityBondInterest) && - Objects.equals(this.marketDiscount, form1099IntRequest.marketDiscount) && - Objects.equals(this.bondPremium, form1099IntRequest.bondPremium) && - Objects.equals(this.bondPremiumOnTreasuryObligations, form1099IntRequest.bondPremiumOnTreasuryObligations) && - Objects.equals(this.bondPremiumOnTaxExemptBond, form1099IntRequest.bondPremiumOnTaxExemptBond) && - Objects.equals(this.taxExemptBondCusipNumber, form1099IntRequest.taxExemptBondCusipNumber) && - Objects.equals(this.type, form1099IntRequest.type) && - Objects.equals(this.issuerId, form1099IntRequest.issuerId) && - Objects.equals(this.referenceId, form1099IntRequest.referenceId) && - Objects.equals(this.recipientTin, form1099IntRequest.recipientTin) && - Objects.equals(this.recipientName, form1099IntRequest.recipientName) && - Objects.equals(this.tinType, form1099IntRequest.tinType) && - Objects.equals(this.recipientSecondName, form1099IntRequest.recipientSecondName) && - Objects.equals(this.address, form1099IntRequest.address) && - Objects.equals(this.address2, form1099IntRequest.address2) && - Objects.equals(this.city, form1099IntRequest.city) && - Objects.equals(this.state, form1099IntRequest.state) && - Objects.equals(this.zip, form1099IntRequest.zip) && - Objects.equals(this.email, form1099IntRequest.email) && - Objects.equals(this.accountNumber, form1099IntRequest.accountNumber) && - Objects.equals(this.officeCode, form1099IntRequest.officeCode) && - Objects.equals(this.nonUsProvince, form1099IntRequest.nonUsProvince) && - Objects.equals(this.countryCode, form1099IntRequest.countryCode) && - Objects.equals(this.federalEFile, form1099IntRequest.federalEFile) && - Objects.equals(this.postalMail, form1099IntRequest.postalMail) && - Objects.equals(this.stateEFile, form1099IntRequest.stateEFile) && - Objects.equals(this.tinMatch, form1099IntRequest.tinMatch) && - Objects.equals(this.noTin, form1099IntRequest.noTin) && - Objects.equals(this.secondTinNotice, form1099IntRequest.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, form1099IntRequest.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, form1099IntRequest.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099IntRequest.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099IntRequest {\n"); - sb.append(" interestIncome: ").append(toIndentedString(interestIncome)).append("\n"); - sb.append(" earlyWithdrawalPenalty: ").append(toIndentedString(earlyWithdrawalPenalty)).append("\n"); - sb.append(" usSavingsBondsInterest: ").append(toIndentedString(usSavingsBondsInterest)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); - sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); - sb.append(" foreignCountry: ").append(toIndentedString(foreignCountry)).append("\n"); - sb.append(" taxExemptInterest: ").append(toIndentedString(taxExemptInterest)).append("\n"); - sb.append(" specifiedPrivateActivityBondInterest: ").append(toIndentedString(specifiedPrivateActivityBondInterest)).append("\n"); - sb.append(" marketDiscount: ").append(toIndentedString(marketDiscount)).append("\n"); - sb.append(" bondPremium: ").append(toIndentedString(bondPremium)).append("\n"); - sb.append(" bondPremiumOnTreasuryObligations: ").append(toIndentedString(bondPremiumOnTreasuryObligations)).append("\n"); - sb.append(" bondPremiumOnTaxExemptBond: ").append(toIndentedString(bondPremiumOnTaxExemptBond)).append("\n"); - sb.append(" taxExemptBondCusipNumber: ").append(toIndentedString(taxExemptBondCusipNumber)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099IntRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099IntRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099IntRequest is not found in the empty JSON string", Form1099IntRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099IntRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099IntRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("foreignCountry") != null && !jsonObj.get("foreignCountry").isJsonNull()) && !jsonObj.get("foreignCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountry").toString())); - } - if ((jsonObj.get("taxExemptBondCusipNumber") != null && !jsonObj.get("taxExemptBondCusipNumber").isJsonNull()) && !jsonObj.get("taxExemptBondCusipNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxExemptBondCusipNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxExemptBondCusipNumber").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099IntRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099IntRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099IntRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099IntRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099IntRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099IntRequest - * @throws IOException if the JSON string is invalid with respect to Form1099IntRequest - */ - public static Form1099IntRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099IntRequest.class); - } - - /** - * Convert an instance of Form1099IntRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntResponse.java deleted file mode 100644 index 50a4d9a..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntResponse.java +++ /dev/null @@ -1,1803 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099IntResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099IntResponse { - public static final String SERIALIZED_NAME_INTEREST_INCOME = "interestIncome"; - @SerializedName(SERIALIZED_NAME_INTEREST_INCOME) - private Double interestIncome; - - public static final String SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY = "earlyWithdrawalPenalty"; - @SerializedName(SERIALIZED_NAME_EARLY_WITHDRAWAL_PENALTY) - private Double earlyWithdrawalPenalty; - - public static final String SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST = "usSavingsBondsInterest"; - @SerializedName(SERIALIZED_NAME_US_SAVINGS_BONDS_INTEREST) - private Double usSavingsBondsInterest; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_INVESTMENT_EXPENSES = "investmentExpenses"; - @SerializedName(SERIALIZED_NAME_INVESTMENT_EXPENSES) - private Double investmentExpenses; - - public static final String SERIALIZED_NAME_FOREIGN_TAX_PAID = "foreignTaxPaid"; - @SerializedName(SERIALIZED_NAME_FOREIGN_TAX_PAID) - private Double foreignTaxPaid; - - public static final String SERIALIZED_NAME_FOREIGN_COUNTRY = "foreignCountry"; - @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY) - private String foreignCountry; - - public static final String SERIALIZED_NAME_TAX_EXEMPT_INTEREST = "taxExemptInterest"; - @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_INTEREST) - private Double taxExemptInterest; - - public static final String SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST = "specifiedPrivateActivityBondInterest"; - @SerializedName(SERIALIZED_NAME_SPECIFIED_PRIVATE_ACTIVITY_BOND_INTEREST) - private Double specifiedPrivateActivityBondInterest; - - public static final String SERIALIZED_NAME_MARKET_DISCOUNT = "marketDiscount"; - @SerializedName(SERIALIZED_NAME_MARKET_DISCOUNT) - private Double marketDiscount; - - public static final String SERIALIZED_NAME_BOND_PREMIUM = "bondPremium"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM) - private Double bondPremium; - - public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS = "bondPremiumOnTreasuryObligations"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TREASURY_OBLIGATIONS) - private Double bondPremiumOnTreasuryObligations; - - public static final String SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND = "bondPremiumOnTaxExemptBond"; - @SerializedName(SERIALIZED_NAME_BOND_PREMIUM_ON_TAX_EXEMPT_BOND) - private Double bondPremiumOnTaxExemptBond; - - public static final String SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER = "taxExemptBondCusipNumber"; - @SerializedName(SERIALIZED_NAME_TAX_EXEMPT_BOND_CUSIP_NUMBER) - private String taxExemptBondCusipNumber; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - /** - * Gets or Sets tinType - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public Form1099IntResponse() { - } - - public Form1099IntResponse( - TypeEnum type - ) { - this(); - this.type = type; - } - - public Form1099IntResponse interestIncome(Double interestIncome) { - this.interestIncome = interestIncome; - return this; - } - - /** - * Interest Income - * @return interestIncome - */ - @javax.annotation.Nullable - public Double getInterestIncome() { - return interestIncome; - } - - public void setInterestIncome(Double interestIncome) { - this.interestIncome = interestIncome; - } - - - public Form1099IntResponse earlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { - this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; - return this; - } - - /** - * Early Withdrawal Penalty - * @return earlyWithdrawalPenalty - */ - @javax.annotation.Nullable - public Double getEarlyWithdrawalPenalty() { - return earlyWithdrawalPenalty; - } - - public void setEarlyWithdrawalPenalty(Double earlyWithdrawalPenalty) { - this.earlyWithdrawalPenalty = earlyWithdrawalPenalty; - } - - - public Form1099IntResponse usSavingsBondsInterest(Double usSavingsBondsInterest) { - this.usSavingsBondsInterest = usSavingsBondsInterest; - return this; - } - - /** - * Interest on U.S. Savings Bonds and Treasury obligations - * @return usSavingsBondsInterest - */ - @javax.annotation.Nullable - public Double getUsSavingsBondsInterest() { - return usSavingsBondsInterest; - } - - public void setUsSavingsBondsInterest(Double usSavingsBondsInterest) { - this.usSavingsBondsInterest = usSavingsBondsInterest; - } - - - public Form1099IntResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099IntResponse investmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - return this; - } - - /** - * Investment Expenses - * @return investmentExpenses - */ - @javax.annotation.Nullable - public Double getInvestmentExpenses() { - return investmentExpenses; - } - - public void setInvestmentExpenses(Double investmentExpenses) { - this.investmentExpenses = investmentExpenses; - } - - - public Form1099IntResponse foreignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - return this; - } - - /** - * Foreign tax paid - * @return foreignTaxPaid - */ - @javax.annotation.Nullable - public Double getForeignTaxPaid() { - return foreignTaxPaid; - } - - public void setForeignTaxPaid(Double foreignTaxPaid) { - this.foreignTaxPaid = foreignTaxPaid; - } - - - public Form1099IntResponse foreignCountry(String foreignCountry) { - this.foreignCountry = foreignCountry; - return this; - } - - /** - * Foreign country or U.S. possession - * @return foreignCountry - */ - @javax.annotation.Nullable - public String getForeignCountry() { - return foreignCountry; - } - - public void setForeignCountry(String foreignCountry) { - this.foreignCountry = foreignCountry; - } - - - public Form1099IntResponse taxExemptInterest(Double taxExemptInterest) { - this.taxExemptInterest = taxExemptInterest; - return this; - } - - /** - * Tax-Exempt Interest - * @return taxExemptInterest - */ - @javax.annotation.Nullable - public Double getTaxExemptInterest() { - return taxExemptInterest; - } - - public void setTaxExemptInterest(Double taxExemptInterest) { - this.taxExemptInterest = taxExemptInterest; - } - - - public Form1099IntResponse specifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { - this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; - return this; - } - - /** - * Specified Private activity - * @return specifiedPrivateActivityBondInterest - */ - @javax.annotation.Nullable - public Double getSpecifiedPrivateActivityBondInterest() { - return specifiedPrivateActivityBondInterest; - } - - public void setSpecifiedPrivateActivityBondInterest(Double specifiedPrivateActivityBondInterest) { - this.specifiedPrivateActivityBondInterest = specifiedPrivateActivityBondInterest; - } - - - public Form1099IntResponse marketDiscount(Double marketDiscount) { - this.marketDiscount = marketDiscount; - return this; - } - - /** - * Market Discount - * @return marketDiscount - */ - @javax.annotation.Nullable - public Double getMarketDiscount() { - return marketDiscount; - } - - public void setMarketDiscount(Double marketDiscount) { - this.marketDiscount = marketDiscount; - } - - - public Form1099IntResponse bondPremium(Double bondPremium) { - this.bondPremium = bondPremium; - return this; - } - - /** - * Bond Premium - * @return bondPremium - */ - @javax.annotation.Nullable - public Double getBondPremium() { - return bondPremium; - } - - public void setBondPremium(Double bondPremium) { - this.bondPremium = bondPremium; - } - - - public Form1099IntResponse bondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { - this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; - return this; - } - - /** - * Bond Premium on Treasury obligations - * @return bondPremiumOnTreasuryObligations - */ - @javax.annotation.Nullable - public Double getBondPremiumOnTreasuryObligations() { - return bondPremiumOnTreasuryObligations; - } - - public void setBondPremiumOnTreasuryObligations(Double bondPremiumOnTreasuryObligations) { - this.bondPremiumOnTreasuryObligations = bondPremiumOnTreasuryObligations; - } - - - public Form1099IntResponse bondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { - this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; - return this; - } - - /** - * Bond Premium on tax exempt bond - * @return bondPremiumOnTaxExemptBond - */ - @javax.annotation.Nullable - public Double getBondPremiumOnTaxExemptBond() { - return bondPremiumOnTaxExemptBond; - } - - public void setBondPremiumOnTaxExemptBond(Double bondPremiumOnTaxExemptBond) { - this.bondPremiumOnTaxExemptBond = bondPremiumOnTaxExemptBond; - } - - - public Form1099IntResponse taxExemptBondCusipNumber(String taxExemptBondCusipNumber) { - this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; - return this; - } - - /** - * Tax exempt bond CUSIP no. - * @return taxExemptBondCusipNumber - */ - @javax.annotation.Nullable - public String getTaxExemptBondCusipNumber() { - return taxExemptBondCusipNumber; - } - - public void setTaxExemptBondCusipNumber(String taxExemptBondCusipNumber) { - this.taxExemptBondCusipNumber = taxExemptBondCusipNumber; - } - - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - - public Form1099IntResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Form1099IntResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099IntResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - public Form1099IntResponse tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Get tinType - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099IntResponse id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public Form1099IntResponse issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Get issuerId - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099IntResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Get issuerReferenceId - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099IntResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Get issuerTin - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099IntResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Get taxYear - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099IntResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099IntResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get recipientName - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099IntResponse recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Get recipientTin - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099IntResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Get recipientSecondName - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099IntResponse address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099IntResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Get address2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099IntResponse city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099IntResponse state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099IntResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099IntResponse email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099IntResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099IntResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Get officeCode - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099IntResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Get nonUsProvince - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099IntResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099IntResponse federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Get federalEFile - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099IntResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Get postalMail - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099IntResponse stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Get stateEFile - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099IntResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Get tinMatch - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099IntResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Get noTin - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099IntResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Get secondTinNotice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099IntResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Get addressVerification - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099IntResponse federalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - return this; - } - - /** - * Get federalEfileStatus - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - public void setFederalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - } - - - public Form1099IntResponse eDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - return this; - } - - /** - * Get eDeliveryStatus - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - } - - - public Form1099IntResponse stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099IntResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); - return this; - } - - /** - * Get stateEfileStatus - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - } - - - public Form1099IntResponse postalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - return this; - } - - /** - * Get postalMailStatus - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - public void setPostalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - } - - - public Form1099IntResponse tinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - return this; - } - - /** - * Get tinMatchStatus - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - public void setTinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - } - - - public Form1099IntResponse addressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - return this; - } - - /** - * Get addressVerificationStatus - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - } - - - public Form1099IntResponse validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1099IntResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } - - /** - * Get validationErrors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099IntResponse form1099IntResponse = (Form1099IntResponse) o; - return Objects.equals(this.interestIncome, form1099IntResponse.interestIncome) && - Objects.equals(this.earlyWithdrawalPenalty, form1099IntResponse.earlyWithdrawalPenalty) && - Objects.equals(this.usSavingsBondsInterest, form1099IntResponse.usSavingsBondsInterest) && - Objects.equals(this.federalIncomeTaxWithheld, form1099IntResponse.federalIncomeTaxWithheld) && - Objects.equals(this.investmentExpenses, form1099IntResponse.investmentExpenses) && - Objects.equals(this.foreignTaxPaid, form1099IntResponse.foreignTaxPaid) && - Objects.equals(this.foreignCountry, form1099IntResponse.foreignCountry) && - Objects.equals(this.taxExemptInterest, form1099IntResponse.taxExemptInterest) && - Objects.equals(this.specifiedPrivateActivityBondInterest, form1099IntResponse.specifiedPrivateActivityBondInterest) && - Objects.equals(this.marketDiscount, form1099IntResponse.marketDiscount) && - Objects.equals(this.bondPremium, form1099IntResponse.bondPremium) && - Objects.equals(this.bondPremiumOnTreasuryObligations, form1099IntResponse.bondPremiumOnTreasuryObligations) && - Objects.equals(this.bondPremiumOnTaxExemptBond, form1099IntResponse.bondPremiumOnTaxExemptBond) && - Objects.equals(this.taxExemptBondCusipNumber, form1099IntResponse.taxExemptBondCusipNumber) && - Objects.equals(this.type, form1099IntResponse.type) && - Objects.equals(this.createdAt, form1099IntResponse.createdAt) && - Objects.equals(this.updatedAt, form1099IntResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099IntResponse.stateAndLocalWithholding) && - Objects.equals(this.tinType, form1099IntResponse.tinType) && - Objects.equals(this.id, form1099IntResponse.id) && - Objects.equals(this.issuerId, form1099IntResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099IntResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099IntResponse.issuerTin) && - Objects.equals(this.taxYear, form1099IntResponse.taxYear) && - Objects.equals(this.referenceId, form1099IntResponse.referenceId) && - Objects.equals(this.recipientName, form1099IntResponse.recipientName) && - Objects.equals(this.recipientTin, form1099IntResponse.recipientTin) && - Objects.equals(this.recipientSecondName, form1099IntResponse.recipientSecondName) && - Objects.equals(this.address, form1099IntResponse.address) && - Objects.equals(this.address2, form1099IntResponse.address2) && - Objects.equals(this.city, form1099IntResponse.city) && - Objects.equals(this.state, form1099IntResponse.state) && - Objects.equals(this.zip, form1099IntResponse.zip) && - Objects.equals(this.email, form1099IntResponse.email) && - Objects.equals(this.accountNumber, form1099IntResponse.accountNumber) && - Objects.equals(this.officeCode, form1099IntResponse.officeCode) && - Objects.equals(this.nonUsProvince, form1099IntResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099IntResponse.countryCode) && - Objects.equals(this.federalEFile, form1099IntResponse.federalEFile) && - Objects.equals(this.postalMail, form1099IntResponse.postalMail) && - Objects.equals(this.stateEFile, form1099IntResponse.stateEFile) && - Objects.equals(this.tinMatch, form1099IntResponse.tinMatch) && - Objects.equals(this.noTin, form1099IntResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099IntResponse.secondTinNotice) && - Objects.equals(this.addressVerification, form1099IntResponse.addressVerification) && - Objects.equals(this.federalEfileStatus, form1099IntResponse.federalEfileStatus) && - Objects.equals(this.eDeliveryStatus, form1099IntResponse.eDeliveryStatus) && - Objects.equals(this.stateEfileStatus, form1099IntResponse.stateEfileStatus) && - Objects.equals(this.postalMailStatus, form1099IntResponse.postalMailStatus) && - Objects.equals(this.tinMatchStatus, form1099IntResponse.tinMatchStatus) && - Objects.equals(this.addressVerificationStatus, form1099IntResponse.addressVerificationStatus) && - Objects.equals(this.validationErrors, form1099IntResponse.validationErrors); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099IntResponse {\n"); - sb.append(" interestIncome: ").append(toIndentedString(interestIncome)).append("\n"); - sb.append(" earlyWithdrawalPenalty: ").append(toIndentedString(earlyWithdrawalPenalty)).append("\n"); - sb.append(" usSavingsBondsInterest: ").append(toIndentedString(usSavingsBondsInterest)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" investmentExpenses: ").append(toIndentedString(investmentExpenses)).append("\n"); - sb.append(" foreignTaxPaid: ").append(toIndentedString(foreignTaxPaid)).append("\n"); - sb.append(" foreignCountry: ").append(toIndentedString(foreignCountry)).append("\n"); - sb.append(" taxExemptInterest: ").append(toIndentedString(taxExemptInterest)).append("\n"); - sb.append(" specifiedPrivateActivityBondInterest: ").append(toIndentedString(specifiedPrivateActivityBondInterest)).append("\n"); - sb.append(" marketDiscount: ").append(toIndentedString(marketDiscount)).append("\n"); - sb.append(" bondPremium: ").append(toIndentedString(bondPremium)).append("\n"); - sb.append(" bondPremiumOnTreasuryObligations: ").append(toIndentedString(bondPremiumOnTreasuryObligations)).append("\n"); - sb.append(" bondPremiumOnTaxExemptBond: ").append(toIndentedString(bondPremiumOnTaxExemptBond)).append("\n"); - sb.append(" taxExemptBondCusipNumber: ").append(toIndentedString(taxExemptBondCusipNumber)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("tinType"); - openapiFields.add("id"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("referenceId"); - openapiFields.add("recipientName"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("addressVerification"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("validationErrors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099IntResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099IntResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099IntResponse is not found in the empty JSON string", Form1099IntResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099IntResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099IntResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("foreignCountry") != null && !jsonObj.get("foreignCountry").isJsonNull()) && !jsonObj.get("foreignCountry").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignCountry").toString())); - } - if ((jsonObj.get("taxExemptBondCusipNumber") != null && !jsonObj.get("taxExemptBondCusipNumber").isJsonNull()) && !jsonObj.get("taxExemptBondCusipNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `taxExemptBondCusipNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxExemptBondCusipNumber").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099IntResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099IntResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099IntResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099IntResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099IntResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099IntResponse - * @throws IOException if the JSON string is invalid with respect to Form1099IntResponse - */ - public static Form1099IntResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099IntResponse.class); - } - - /** - * Convert an instance of Form1099IntResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java index 954679f..04b891b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java @@ -30,6 +30,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -61,12 +62,12 @@ import Avalara.SDK.JSON; /** - * Form1099K + * Form 1099-K: Payment Card and Third Party Network Transactions */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1099K { /** - * Gets or Sets filerType + * Filer type (PSE or EPF) */ @JsonAdapter(FilerTypeEnum.Adapter.class) public enum FilerTypeEnum { @@ -97,7 +98,7 @@ public static FilerTypeEnum fromValue(String value) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } public static class Adapter extends TypeAdapter { @@ -124,7 +125,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private FilerTypeEnum filerType; /** - * Gets or Sets paymentType + * Payment type (payment card or third party network) */ @JsonAdapter(PaymentTypeEnum.Adapter.class) public enum PaymentTypeEnum { @@ -153,7 +154,7 @@ public static PaymentTypeEnum fromValue(String value) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } public static class Adapter extends TypeAdapter { @@ -235,9 +236,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_AUGUST) private Double august; - public static final String SERIALIZED_NAME_SEPT = "sept"; - @SerializedName(SERIALIZED_NAME_SEPT) - private Double sept; + public static final String SERIALIZED_NAME_SEPTEMBER = "september"; + @SerializedName(SERIALIZED_NAME_SEPTEMBER) + private Double september; public static final String SERIALIZED_NAME_OCTOBER = "october"; @SerializedName(SERIALIZED_NAME_OCTOBER) @@ -251,17 +252,83 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_DECEMBER) private Double december; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; + /** + * Form type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1099_NEC("1099-NEC"), + + _1099_MISC("1099-MISC"), + + _1099_DIV("1099-DIV"), + + _1099_R("1099-R"), + + _1099_K("1099-K"), + + _1095_B("1095-B"), + + _1042_S("1042-S"), + + _1095_C("1095-C"), + + _1099_INT("1099-INT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private String type; + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; + private String issuerId; public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) @@ -275,81 +342,79 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TAX_YEAR) private Integer taxYear; - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; + /** + * Type of TIN (Tax ID Number) + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EMPTY("Empty"), + + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"); - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private Form1099StatusDetail postalMailStatus; + private String value; - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; + TinTypeEnum(String value) { + this.value = value; + } - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private Form1099StatusDetail tinMatchStatus; + public String getValue() { + return value; + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; + @Override + public String toString() { + return String.valueOf(value); + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private Form1099StatusDetail addressVerificationStatus; + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private Form1099StatusDetail eDeliveryStatus; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; + private TinTypeEnum tinType; public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) @@ -375,6 +440,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_ZIP) private String zip; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -383,13 +460,65 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) private String countryCode; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) @@ -403,20 +532,41 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholding stateAndLocalWithholding; - public Form1099K() { } + public Form1099K( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + public Form1099K filerType(FilerTypeEnum filerType) { this.filerType = filerType; return this; } /** - * Get filerType + * Filer type (PSE or EPF) * @return filerType */ @javax.annotation.Nullable @@ -435,7 +585,7 @@ public Form1099K paymentType(PaymentTypeEnum paymentType) { } /** - * Get paymentType + * Payment type (payment card or third party network) * @return paymentType */ @javax.annotation.Nullable @@ -454,7 +604,7 @@ public Form1099K paymentSettlementEntityNamePhoneNumber(String paymentSettlement } /** - * Get paymentSettlementEntityNamePhoneNumber + * Payment settlement entity name and phone number * @return paymentSettlementEntityNamePhoneNumber */ @javax.annotation.Nullable @@ -473,7 +623,7 @@ public Form1099K grossAmountPaymentCard(Double grossAmountPaymentCard) { } /** - * Get grossAmountPaymentCard + * Gross amount of payment card/third party network transactions * @return grossAmountPaymentCard */ @javax.annotation.Nullable @@ -492,7 +642,7 @@ public Form1099K cardNotPresentTransactions(Double cardNotPresentTransactions) { } /** - * Get cardNotPresentTransactions + * Card not present transactions * @return cardNotPresentTransactions */ @javax.annotation.Nullable @@ -511,7 +661,7 @@ public Form1099K merchantCategoryCode(String merchantCategoryCode) { } /** - * Get merchantCategoryCode + * Merchant category code * @return merchantCategoryCode */ @javax.annotation.Nullable @@ -530,7 +680,7 @@ public Form1099K paymentTransactionNumber(Double paymentTransactionNumber) { } /** - * Get paymentTransactionNumber + * Number of payment transactions * @return paymentTransactionNumber */ @javax.annotation.Nullable @@ -549,7 +699,7 @@ public Form1099K federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { } /** - * Get federalIncomeTaxWithheld + * Federal income tax withheld * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable @@ -568,7 +718,7 @@ public Form1099K january(Double january) { } /** - * Get january + * January gross payments * @return january */ @javax.annotation.Nullable @@ -587,7 +737,7 @@ public Form1099K february(Double february) { } /** - * Get february + * February gross payments * @return february */ @javax.annotation.Nullable @@ -606,7 +756,7 @@ public Form1099K march(Double march) { } /** - * Get march + * March gross payments * @return march */ @javax.annotation.Nullable @@ -625,7 +775,7 @@ public Form1099K april(Double april) { } /** - * Get april + * April gross payments * @return april */ @javax.annotation.Nullable @@ -644,7 +794,7 @@ public Form1099K may(Double may) { } /** - * Get may + * May gross payments * @return may */ @javax.annotation.Nullable @@ -663,7 +813,7 @@ public Form1099K june(Double june) { } /** - * Get june + * June gross payments * @return june */ @javax.annotation.Nullable @@ -682,7 +832,7 @@ public Form1099K july(Double july) { } /** - * Get july + * July gross payments * @return july */ @javax.annotation.Nullable @@ -701,7 +851,7 @@ public Form1099K august(Double august) { } /** - * Get august + * August gross payments * @return august */ @javax.annotation.Nullable @@ -714,22 +864,22 @@ public void setAugust(Double august) { } - public Form1099K sept(Double sept) { - this.sept = sept; + public Form1099K september(Double september) { + this.september = september; return this; } /** - * Get sept - * @return sept + * September gross payments + * @return september */ @javax.annotation.Nullable - public Double getSept() { - return sept; + public Double getSeptember() { + return september; } - public void setSept(Double sept) { - this.sept = sept; + public void setSeptember(Double september) { + this.september = september; } @@ -739,7 +889,7 @@ public Form1099K october(Double october) { } /** - * Get october + * October gross payments * @return october */ @javax.annotation.Nullable @@ -758,7 +908,7 @@ public Form1099K november(Double november) { } /** - * Get november + * November gross payments * @return november */ @javax.annotation.Nullable @@ -777,7 +927,7 @@ public Form1099K december(Double december) { } /** - * Get december + * December gross payments * @return december */ @javax.annotation.Nullable @@ -790,59 +940,51 @@ public void setDecember(Double december) { } - public Form1099K id(String id) { - this.id = id; + public Form1099K type(TypeEnum type) { + this.type = type; return this; } /** - * Get id - * @return id + * Form type + * @return type */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; } - - public Form1099K type(String type) { + public void setType(TypeEnum type) { this.type = type; - return this; } + /** - * Get type - * @return type + * Form ID. Unique identifier set when the record is created. + * @return id */ @javax.annotation.Nullable - public String getType() { - return type; + public String getId() { + return id; } - public void setType(String type) { - this.type = type; - } - public Form1099K issuerId(Integer issuerId) { + public Form1099K issuerId(String issuerId) { this.issuerId = issuerId; return this; } /** - * Get issuerId + * Issuer ID - only required when creating forms * @return issuerId */ @javax.annotation.Nullable - public Integer getIssuerId() { + public String getIssuerId() { return issuerId; } - public void setIssuerId(Integer issuerId) { + public void setIssuerId(String issuerId) { this.issuerId = issuerId; } @@ -853,7 +995,7 @@ public Form1099K issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID - only required when creating forms * @return issuerReferenceId */ @javax.annotation.Nullable @@ -872,7 +1014,7 @@ public Form1099K issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN - readonly * @return issuerTin */ @javax.annotation.Nullable @@ -891,7 +1033,7 @@ public Form1099K taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax Year - only required when creating forms * @return taxYear */ @javax.annotation.Nullable @@ -904,580 +1046,530 @@ public void setTaxYear(Integer taxYear) { } - public Form1099K federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; + public Form1099K referenceId(String referenceId) { + this.referenceId = referenceId; return this; } /** - * Get federalEfile - * @return federalEfile + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId */ @javax.annotation.Nullable - public Boolean getFederalEfile() { - return federalEfile; + public String getReferenceId() { + return referenceId; } - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } - public Form1099K federalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public Form1099K tin(String tin) { + this.tin = tin; return this; } /** - * Get federalEfileStatus - * @return federalEfileStatus + * Recipient's Federal Tax Identification Number (TIN). + * @return tin */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { - return federalEfileStatus; + public String getTin() { + return tin; } - public void setFederalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public void setTin(String tin) { + this.tin = tin; } - public Form1099K stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public Form1099K recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get stateEfile - * @return stateEfile + * Recipient name + * @return recipientName */ @javax.annotation.Nullable - public Boolean getStateEfile() { - return stateEfile; + public String getRecipientName() { + return recipientName; } - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } - public Form1099K stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099K addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); + public Form1099K tinType(TinTypeEnum tinType) { + this.tinType = tinType; return this; } /** - * Get stateEfileStatus - * @return stateEfileStatus + * Type of TIN (Tax ID Number) + * @return tinType */ @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; + public TinTypeEnum getTinType() { + return tinType; } - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; } - public Form1099K postalMail(Boolean postalMail) { - this.postalMail = postalMail; + public Form1099K recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; return this; } /** - * Get postalMail - * @return postalMail + * Recipient second name + * @return recipientSecondName */ @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; + public String getRecipientSecondName() { + return recipientSecondName; } - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; } - public Form1099K postalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public Form1099K address(String address) { + this.address = address; return this; } /** - * Get postalMailStatus - * @return postalMailStatus + * Address. + * @return address */ @javax.annotation.Nullable - public Form1099StatusDetail getPostalMailStatus() { - return postalMailStatus; + public String getAddress() { + return address; } - public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public void setAddress(String address) { + this.address = address; } - public Form1099K tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public Form1099K address2(String address2) { + this.address2 = address2; return this; } /** - * Get tinMatch - * @return tinMatch + * Address line 2. + * @return address2 */ @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; + public String getAddress2() { + return address2; } - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public void setAddress2(String address2) { + this.address2 = address2; } - public Form1099K tinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public Form1099K city(String city) { + this.city = city; return this; } /** - * Get tinMatchStatus - * @return tinMatchStatus + * City. + * @return city */ @javax.annotation.Nullable - public Form1099StatusDetail getTinMatchStatus() { - return tinMatchStatus; + public String getCity() { + return city; } - public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public void setCity(String city) { + this.city = city; } - public Form1099K addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public Form1099K state(String state) { + this.state = state; return this; } /** - * Get addressVerification - * @return addressVerification + * Two-letter US state or Canadian province code (required for US/CA addresses). + * @return state */ @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; + public String getState() { + return state; } - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public void setState(String state) { + this.state = state; } - public Form1099K addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public Form1099K zip(String zip) { + this.zip = zip; return this; } /** - * Get addressVerificationStatus - * @return addressVerificationStatus + * ZIP/postal code. + * @return zip */ @javax.annotation.Nullable - public Form1099StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; + public String getZip() { + return zip; } - public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public void setZip(String zip) { + this.zip = zip; } - public Form1099K eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public Form1099K email(String email) { + this.email = email; return this; } /** - * Get eDeliveryStatus - * @return eDeliveryStatus + * Recipient's Contact email address. + * @return email */ @javax.annotation.Nullable - public Form1099StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; + public String getEmail() { + return email; } - public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public void setEmail(String email) { + this.email = email; } - public Form1099K referenceId(String referenceId) { - this.referenceId = referenceId; + public Form1099K accountNumber(String accountNumber) { + this.accountNumber = accountNumber; return this; } /** - * Get referenceId - * @return referenceId + * Account number + * @return accountNumber */ @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; + public String getAccountNumber() { + return accountNumber; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; } - public Form1099K email(String email) { - this.email = email; + public Form1099K officeCode(String officeCode) { + this.officeCode = officeCode; return this; } /** - * Get email - * @return email + * Office code + * @return officeCode */ @javax.annotation.Nullable - public String getEmail() { - return email; + public String getOfficeCode() { + return officeCode; } - public void setEmail(String email) { - this.email = email; + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; } - public Form1099K tinType(String tinType) { - this.tinType = tinType; + public Form1099K nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get tinType - * @return tinType + * Province or region for non-US/CA addresses. + * @return nonUsProvince */ @javax.annotation.Nullable - public String getTinType() { - return tinType; + public String getNonUsProvince() { + return nonUsProvince; } - public void setTinType(String tinType) { - this.tinType = tinType; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } - public Form1099K fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public Form1099K countryCode(String countryCode) { + this.countryCode = countryCode; return this; } /** - * Get fatcaFilingRequirement - * @return fatcaFilingRequirement + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode */ @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; + public String getCountryCode() { + return countryCode; } - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; } - public Form1099K tin(String tin) { - this.tin = tin; + public Form1099K federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; return this; } /** - * Get tin - * @return tin + * Date when federal e-filing should be scheduled for this form + * @return federalEfileDate */ @javax.annotation.Nullable - public String getTin() { - return tin; + public LocalDate getFederalEfileDate() { + return federalEfileDate; } - public void setTin(String tin) { - this.tin = tin; + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; } - public Form1099K noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099K postalMail(Boolean postalMail) { + this.postalMail = postalMail; return this; } /** - * Get noTin - * @return noTin + * Boolean indicating that postal mailing to the recipient should be scheduled for this form + * @return postalMail */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getPostalMail() { + return postalMail; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; } - public Form1099K secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public Form1099K stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; return this; } /** - * Get secondTinNotice - * @return secondTinNotice + * Date when state e-filing should be scheduled for this form + * @return stateEfileDate */ @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; + public LocalDate getStateEfileDate() { + return stateEfileDate; } - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; } - public Form1099K recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099K recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; return this; } /** - * Get recipientName - * @return recipientName + * Date when recipient e-delivery should be scheduled for this form + * @return recipientEdeliveryDate */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; } - public Form1099K recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public Form1099K tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; return this; } /** - * Get recipientSecondName - * @return recipientSecondName + * Boolean indicating that TIN Matching should be scheduled for this form + * @return tinMatch */ @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; + public Boolean getTinMatch() { + return tinMatch; } - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; } - public Form1099K address(String address) { - this.address = address; + public Form1099K noTin(Boolean noTin) { + this.noTin = noTin; return this; } /** - * Get address - * @return address + * No TIN indicator + * @return noTin */ @javax.annotation.Nullable - public String getAddress() { - return address; + public Boolean getNoTin() { + return noTin; } - public void setAddress(String address) { - this.address = address; + public void setNoTin(Boolean noTin) { + this.noTin = noTin; } - public Form1099K address2(String address2) { - this.address2 = address2; + public Form1099K addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * Get address2 - * @return address2 + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public String getAddress2() { - return address2; + public Boolean getAddressVerification() { + return addressVerification; } - public void setAddress2(String address2) { - this.address2 = address2; + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } - public Form1099K city(String city) { - this.city = city; + public Form1099K stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; return this; } /** - * Get city - * @return city + * State and local withholding information + * @return stateAndLocalWithholding */ @javax.annotation.Nullable - public String getCity() { - return city; + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; } - public void setCity(String city) { - this.city = city; + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; } - public Form1099K state(String state) { - this.state = state; + public Form1099K secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; return this; } /** - * Get state - * @return state + * Second TIN notice + * @return secondTinNotice */ @javax.annotation.Nullable - public String getState() { - return state; + public Boolean getSecondTinNotice() { + return secondTinNotice; } - public void setState(String state) { - this.state = state; + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; } - public Form1099K zip(String zip) { - this.zip = zip; - return this; - } - /** - * Get zip - * @return zip + * Federal e-file status + * @return federalEfileStatus */ @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; } - public Form1099K nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } /** - * Get nonUsProvince - * @return nonUsProvince + * State e-file status + * @return stateEfileStatus */ @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; + public List getStateEfileStatus() { + return stateEfileStatus; } - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - public Form1099K countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - /** - * Get countryCode - * @return countryCode + * Postal mail to recipient status + * @return postalMailStatus */ @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; } - public Form1099K accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } /** - * Get accountNumber - * @return accountNumber + * TIN Match status + * @return tinMatchStatus */ @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; } - public Form1099K officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } /** - * Get officeCode - * @return officeCode + * Address verification status + * @return addressVerificationStatus */ @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; } - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - public Form1099K validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; + /** + * EDelivery status + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; } - public Form1099K addValidationErrorsItem(ValidationError validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } + /** - * Get validationErrors + * Validation errors * @return validationErrors */ @javax.annotation.Nullable @@ -1485,18 +1577,10 @@ public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - public Form1099K createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } /** - * Get createdAt + * Date time when the record was created. * @return createdAt */ @javax.annotation.Nullable @@ -1504,18 +1588,10 @@ public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public Form1099K updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } /** - * Get updatedAt + * Date time when the record was last updated. * @return updatedAt */ @javax.annotation.Nullable @@ -1523,28 +1599,6 @@ public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099K stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholding getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } @@ -1573,49 +1627,49 @@ public boolean equals(Object o) { Objects.equals(this.june, form1099K.june) && Objects.equals(this.july, form1099K.july) && Objects.equals(this.august, form1099K.august) && - Objects.equals(this.sept, form1099K.sept) && + Objects.equals(this.september, form1099K.september) && Objects.equals(this.october, form1099K.october) && Objects.equals(this.november, form1099K.november) && Objects.equals(this.december, form1099K.december) && - Objects.equals(this.id, form1099K.id) && Objects.equals(this.type, form1099K.type) && + Objects.equals(this.id, form1099K.id) && Objects.equals(this.issuerId, form1099K.issuerId) && Objects.equals(this.issuerReferenceId, form1099K.issuerReferenceId) && Objects.equals(this.issuerTin, form1099K.issuerTin) && Objects.equals(this.taxYear, form1099K.taxYear) && - Objects.equals(this.federalEfile, form1099K.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099K.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099K.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099K.stateEfileStatus) && - Objects.equals(this.postalMail, form1099K.postalMail) && - Objects.equals(this.postalMailStatus, form1099K.postalMailStatus) && - Objects.equals(this.tinMatch, form1099K.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099K.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099K.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099K.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099K.eDeliveryStatus) && Objects.equals(this.referenceId, form1099K.referenceId) && - Objects.equals(this.email, form1099K.email) && - Objects.equals(this.tinType, form1099K.tinType) && - Objects.equals(this.fatcaFilingRequirement, form1099K.fatcaFilingRequirement) && Objects.equals(this.tin, form1099K.tin) && - Objects.equals(this.noTin, form1099K.noTin) && - Objects.equals(this.secondTinNotice, form1099K.secondTinNotice) && Objects.equals(this.recipientName, form1099K.recipientName) && + Objects.equals(this.tinType, form1099K.tinType) && Objects.equals(this.recipientSecondName, form1099K.recipientSecondName) && Objects.equals(this.address, form1099K.address) && Objects.equals(this.address2, form1099K.address2) && Objects.equals(this.city, form1099K.city) && Objects.equals(this.state, form1099K.state) && Objects.equals(this.zip, form1099K.zip) && - Objects.equals(this.nonUsProvince, form1099K.nonUsProvince) && - Objects.equals(this.countryCode, form1099K.countryCode) && + Objects.equals(this.email, form1099K.email) && Objects.equals(this.accountNumber, form1099K.accountNumber) && Objects.equals(this.officeCode, form1099K.officeCode) && + Objects.equals(this.nonUsProvince, form1099K.nonUsProvince) && + Objects.equals(this.countryCode, form1099K.countryCode) && + Objects.equals(this.federalEfileDate, form1099K.federalEfileDate) && + Objects.equals(this.postalMail, form1099K.postalMail) && + Objects.equals(this.stateEfileDate, form1099K.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099K.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099K.tinMatch) && + Objects.equals(this.noTin, form1099K.noTin) && + Objects.equals(this.addressVerification, form1099K.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099K.stateAndLocalWithholding) && + Objects.equals(this.secondTinNotice, form1099K.secondTinNotice) && + Objects.equals(this.federalEfileStatus, form1099K.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099K.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099K.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099K.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099K.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099K.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099K.validationErrors) && Objects.equals(this.createdAt, form1099K.createdAt) && - Objects.equals(this.updatedAt, form1099K.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099K.stateAndLocalWithholding); + Objects.equals(this.updatedAt, form1099K.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1624,7 +1678,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, sept, october, november, december, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, fatcaFilingRequirement, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, september, october, november, december, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -1654,49 +1708,49 @@ public String toString() { sb.append(" june: ").append(toIndentedString(june)).append("\n"); sb.append(" july: ").append(toIndentedString(july)).append("\n"); sb.append(" august: ").append(toIndentedString(august)).append("\n"); - sb.append(" sept: ").append(toIndentedString(sept)).append("\n"); + sb.append(" september: ").append(toIndentedString(september)).append("\n"); sb.append(" october: ").append(toIndentedString(october)).append("\n"); sb.append(" november: ").append(toIndentedString(november)).append("\n"); sb.append(" december: ").append(toIndentedString(december)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1719,48 +1773,53 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("id"); openapiFields.add("type"); + openapiFields.add("id"); openapiFields.add("issuerId"); openapiFields.add("issuerReferenceId"); openapiFields.add("issuerTin"); openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); + openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); + openapiFields.add("email"); openapiFields.add("accountNumber"); openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("secondTinNotice"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1783,6 +1842,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099K` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099K.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) && !jsonObj.get("filerType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `filerType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("filerType").toString())); @@ -1804,11 +1870,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("merchantCategoryCode") != null && !jsonObj.get("merchantCategoryCode").isJsonNull()) && !jsonObj.get("merchantCategoryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `merchantCategoryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("merchantCategoryCode").toString())); } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); } if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); @@ -1816,55 +1887,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } @@ -1883,17 +1921,58 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); @@ -1909,10 +1988,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KList.java deleted file mode 100644 index 5017161..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KList.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1099KListItem; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099KList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099KList { - public static final String SERIALIZED_NAME_FORMS = "forms"; - @SerializedName(SERIALIZED_NAME_FORMS) - private List forms; - - public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; - @SerializedName(SERIALIZED_NAME_FORM_TYPE) - private String formType; - - public Form1099KList() { - } - - public Form1099KList forms(List forms) { - this.forms = forms; - return this; - } - - public Form1099KList addFormsItem(Form1099KListItem formsItem) { - if (this.forms == null) { - this.forms = new ArrayList<>(); - } - this.forms.add(formsItem); - return this; - } - - /** - * Get forms - * @return forms - */ - @javax.annotation.Nullable - public List getForms() { - return forms; - } - - public void setForms(List forms) { - this.forms = forms; - } - - - public Form1099KList formType(String formType) { - this.formType = formType; - return this; - } - - /** - * Get formType - * @return formType - */ - @javax.annotation.Nullable - public String getFormType() { - return formType; - } - - public void setFormType(String formType) { - this.formType = formType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099KList form1099KList = (Form1099KList) o; - return Objects.equals(this.forms, form1099KList.forms) && - Objects.equals(this.formType, form1099KList.formType); - } - - @Override - public int hashCode() { - return Objects.hash(forms, formType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099KList {\n"); - sb.append(" forms: ").append(toIndentedString(forms)).append("\n"); - sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("formType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099KList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099KList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099KList is not found in the empty JSON string", Form1099KList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099KList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099KList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("forms") != null && !jsonObj.get("forms").isJsonNull()) { - JsonArray jsonArrayforms = jsonObj.getAsJsonArray("forms"); - if (jsonArrayforms != null) { - // ensure the json data is an array - if (!jsonObj.get("forms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `forms` to be an array in the JSON string but got `%s`", jsonObj.get("forms").toString())); - } - - // validate the optional field `forms` (array) - for (int i = 0; i < jsonArrayforms.size(); i++) { - Form1099KListItem.validateJsonElement(jsonArrayforms.get(i)); - }; - } - } - if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099KList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099KList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099KList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099KList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099KList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099KList given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099KList - * @throws IOException if the JSON string is invalid with respect to Form1099KList - */ - public static Form1099KList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099KList.class); - } - - /** - * Convert an instance of Form1099KList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItem.java deleted file mode 100644 index c39406f..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItem.java +++ /dev/null @@ -1,1676 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099KListItem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099KListItem { - /** - * Filer type (PSE or EPF) - */ - @JsonAdapter(FilerTypeEnum.Adapter.class) - public enum FilerTypeEnum { - PSE("PSE"), - - EPF("EPF"), - - OTHER("Other"); - - private String value; - - FilerTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FilerTypeEnum fromValue(String value) { - for (FilerTypeEnum b : FilerTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FilerTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FilerTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FilerTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FilerTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FILER_TYPE = "filerType"; - @SerializedName(SERIALIZED_NAME_FILER_TYPE) - private FilerTypeEnum filerType; - - /** - * Payment type (payment card or third party network) - */ - @JsonAdapter(PaymentTypeEnum.Adapter.class) - public enum PaymentTypeEnum { - MERCHANT_PAYMENT_CARD("MerchantPaymentCard"), - - THIRD_PARTY_NETWORK("ThirdPartyNetwork"); - - private String value; - - PaymentTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PaymentTypeEnum fromValue(String value) { - for (PaymentTypeEnum b : PaymentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PaymentTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PaymentTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PaymentTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PaymentTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PAYMENT_TYPE = "paymentType"; - @SerializedName(SERIALIZED_NAME_PAYMENT_TYPE) - private PaymentTypeEnum paymentType; - - public static final String SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME_PHONE_NUMBER = "paymentSettlementEntityNamePhoneNumber"; - @SerializedName(SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME_PHONE_NUMBER) - private String paymentSettlementEntityNamePhoneNumber; - - public static final String SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD = "grossAmountPaymentCard"; - @SerializedName(SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD) - private Double grossAmountPaymentCard; - - public static final String SERIALIZED_NAME_CARD_NOT_PRESENT_TRANSACTIONS = "cardNotPresentTransactions"; - @SerializedName(SERIALIZED_NAME_CARD_NOT_PRESENT_TRANSACTIONS) - private Double cardNotPresentTransactions; - - public static final String SERIALIZED_NAME_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; - @SerializedName(SERIALIZED_NAME_MERCHANT_CATEGORY_CODE) - private String merchantCategoryCode; - - public static final String SERIALIZED_NAME_PAYMENT_TRANSACTION_NUMBER = "paymentTransactionNumber"; - @SerializedName(SERIALIZED_NAME_PAYMENT_TRANSACTION_NUMBER) - private Double paymentTransactionNumber; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_JANUARY = "january"; - @SerializedName(SERIALIZED_NAME_JANUARY) - private Double january; - - public static final String SERIALIZED_NAME_FEBRUARY = "february"; - @SerializedName(SERIALIZED_NAME_FEBRUARY) - private Double february; - - public static final String SERIALIZED_NAME_MARCH = "march"; - @SerializedName(SERIALIZED_NAME_MARCH) - private Double march; - - public static final String SERIALIZED_NAME_APRIL = "april"; - @SerializedName(SERIALIZED_NAME_APRIL) - private Double april; - - public static final String SERIALIZED_NAME_MAY = "may"; - @SerializedName(SERIALIZED_NAME_MAY) - private Double may; - - public static final String SERIALIZED_NAME_JUNE = "june"; - @SerializedName(SERIALIZED_NAME_JUNE) - private Double june; - - public static final String SERIALIZED_NAME_JULY = "july"; - @SerializedName(SERIALIZED_NAME_JULY) - private Double july; - - public static final String SERIALIZED_NAME_AUGUST = "august"; - @SerializedName(SERIALIZED_NAME_AUGUST) - private Double august; - - public static final String SERIALIZED_NAME_SEPT = "sept"; - @SerializedName(SERIALIZED_NAME_SEPT) - private Double sept; - - public static final String SERIALIZED_NAME_OCTOBER = "october"; - @SerializedName(SERIALIZED_NAME_OCTOBER) - private Double october; - - public static final String SERIALIZED_NAME_NOVEMBER = "november"; - @SerializedName(SERIALIZED_NAME_NOVEMBER) - private Double november; - - public static final String SERIALIZED_NAME_DECEMBER = "december"; - @SerializedName(SERIALIZED_NAME_DECEMBER) - private Double december; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099KListItem() { - } - - public Form1099KListItem filerType(FilerTypeEnum filerType) { - this.filerType = filerType; - return this; - } - - /** - * Filer type (PSE or EPF) - * @return filerType - */ - @javax.annotation.Nullable - public FilerTypeEnum getFilerType() { - return filerType; - } - - public void setFilerType(FilerTypeEnum filerType) { - this.filerType = filerType; - } - - - public Form1099KListItem paymentType(PaymentTypeEnum paymentType) { - this.paymentType = paymentType; - return this; - } - - /** - * Payment type (payment card or third party network) - * @return paymentType - */ - @javax.annotation.Nullable - public PaymentTypeEnum getPaymentType() { - return paymentType; - } - - public void setPaymentType(PaymentTypeEnum paymentType) { - this.paymentType = paymentType; - } - - - public Form1099KListItem paymentSettlementEntityNamePhoneNumber(String paymentSettlementEntityNamePhoneNumber) { - this.paymentSettlementEntityNamePhoneNumber = paymentSettlementEntityNamePhoneNumber; - return this; - } - - /** - * Payment settlement entity name and phone number - * @return paymentSettlementEntityNamePhoneNumber - */ - @javax.annotation.Nullable - public String getPaymentSettlementEntityNamePhoneNumber() { - return paymentSettlementEntityNamePhoneNumber; - } - - public void setPaymentSettlementEntityNamePhoneNumber(String paymentSettlementEntityNamePhoneNumber) { - this.paymentSettlementEntityNamePhoneNumber = paymentSettlementEntityNamePhoneNumber; - } - - - public Form1099KListItem grossAmountPaymentCard(Double grossAmountPaymentCard) { - this.grossAmountPaymentCard = grossAmountPaymentCard; - return this; - } - - /** - * Gross amount of payment card/third party network transactions - * @return grossAmountPaymentCard - */ - @javax.annotation.Nullable - public Double getGrossAmountPaymentCard() { - return grossAmountPaymentCard; - } - - public void setGrossAmountPaymentCard(Double grossAmountPaymentCard) { - this.grossAmountPaymentCard = grossAmountPaymentCard; - } - - - public Form1099KListItem cardNotPresentTransactions(Double cardNotPresentTransactions) { - this.cardNotPresentTransactions = cardNotPresentTransactions; - return this; - } - - /** - * Card not present transactions - * @return cardNotPresentTransactions - */ - @javax.annotation.Nullable - public Double getCardNotPresentTransactions() { - return cardNotPresentTransactions; - } - - public void setCardNotPresentTransactions(Double cardNotPresentTransactions) { - this.cardNotPresentTransactions = cardNotPresentTransactions; - } - - - public Form1099KListItem merchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - return this; - } - - /** - * Merchant category code - * @return merchantCategoryCode - */ - @javax.annotation.Nullable - public String getMerchantCategoryCode() { - return merchantCategoryCode; - } - - public void setMerchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - } - - - public Form1099KListItem paymentTransactionNumber(Double paymentTransactionNumber) { - this.paymentTransactionNumber = paymentTransactionNumber; - return this; - } - - /** - * Number of payment transactions - * @return paymentTransactionNumber - */ - @javax.annotation.Nullable - public Double getPaymentTransactionNumber() { - return paymentTransactionNumber; - } - - public void setPaymentTransactionNumber(Double paymentTransactionNumber) { - this.paymentTransactionNumber = paymentTransactionNumber; - } - - - public Form1099KListItem federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099KListItem january(Double january) { - this.january = january; - return this; - } - - /** - * January gross payments - * @return january - */ - @javax.annotation.Nullable - public Double getJanuary() { - return january; - } - - public void setJanuary(Double january) { - this.january = january; - } - - - public Form1099KListItem february(Double february) { - this.february = february; - return this; - } - - /** - * February gross payments - * @return february - */ - @javax.annotation.Nullable - public Double getFebruary() { - return february; - } - - public void setFebruary(Double february) { - this.february = february; - } - - - public Form1099KListItem march(Double march) { - this.march = march; - return this; - } - - /** - * March gross payments - * @return march - */ - @javax.annotation.Nullable - public Double getMarch() { - return march; - } - - public void setMarch(Double march) { - this.march = march; - } - - - public Form1099KListItem april(Double april) { - this.april = april; - return this; - } - - /** - * April gross payments - * @return april - */ - @javax.annotation.Nullable - public Double getApril() { - return april; - } - - public void setApril(Double april) { - this.april = april; - } - - - public Form1099KListItem may(Double may) { - this.may = may; - return this; - } - - /** - * May gross payments - * @return may - */ - @javax.annotation.Nullable - public Double getMay() { - return may; - } - - public void setMay(Double may) { - this.may = may; - } - - - public Form1099KListItem june(Double june) { - this.june = june; - return this; - } - - /** - * June gross payments - * @return june - */ - @javax.annotation.Nullable - public Double getJune() { - return june; - } - - public void setJune(Double june) { - this.june = june; - } - - - public Form1099KListItem july(Double july) { - this.july = july; - return this; - } - - /** - * July gross payments - * @return july - */ - @javax.annotation.Nullable - public Double getJuly() { - return july; - } - - public void setJuly(Double july) { - this.july = july; - } - - - public Form1099KListItem august(Double august) { - this.august = august; - return this; - } - - /** - * August gross payments - * @return august - */ - @javax.annotation.Nullable - public Double getAugust() { - return august; - } - - public void setAugust(Double august) { - this.august = august; - } - - - public Form1099KListItem sept(Double sept) { - this.sept = sept; - return this; - } - - /** - * September gross payments - * @return sept - */ - @javax.annotation.Nullable - public Double getSept() { - return sept; - } - - public void setSept(Double sept) { - this.sept = sept; - } - - - public Form1099KListItem october(Double october) { - this.october = october; - return this; - } - - /** - * October gross payments - * @return october - */ - @javax.annotation.Nullable - public Double getOctober() { - return october; - } - - public void setOctober(Double october) { - this.october = october; - } - - - public Form1099KListItem november(Double november) { - this.november = november; - return this; - } - - /** - * November gross payments - * @return november - */ - @javax.annotation.Nullable - public Double getNovember() { - return november; - } - - public void setNovember(Double november) { - this.november = november; - } - - - public Form1099KListItem december(Double december) { - this.december = december; - return this; - } - - /** - * December gross payments - * @return december - */ - @javax.annotation.Nullable - public Double getDecember() { - return december; - } - - public void setDecember(Double december) { - this.december = december; - } - - - public Form1099KListItem issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099KListItem issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099KListItem taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nonnull - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099KListItem issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099KListItem referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099KListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099KListItem recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099KListItem tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099KListItem recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099KListItem address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099KListItem address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099KListItem city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099KListItem state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099KListItem zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099KListItem email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099KListItem accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099KListItem officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099KListItem nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099KListItem countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099KListItem federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099KListItem postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099KListItem stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099KListItem tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099KListItem noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099KListItem secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099KListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099KListItem addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099KListItem stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099KListItem form1099KListItem = (Form1099KListItem) o; - return Objects.equals(this.filerType, form1099KListItem.filerType) && - Objects.equals(this.paymentType, form1099KListItem.paymentType) && - Objects.equals(this.paymentSettlementEntityNamePhoneNumber, form1099KListItem.paymentSettlementEntityNamePhoneNumber) && - Objects.equals(this.grossAmountPaymentCard, form1099KListItem.grossAmountPaymentCard) && - Objects.equals(this.cardNotPresentTransactions, form1099KListItem.cardNotPresentTransactions) && - Objects.equals(this.merchantCategoryCode, form1099KListItem.merchantCategoryCode) && - Objects.equals(this.paymentTransactionNumber, form1099KListItem.paymentTransactionNumber) && - Objects.equals(this.federalIncomeTaxWithheld, form1099KListItem.federalIncomeTaxWithheld) && - Objects.equals(this.january, form1099KListItem.january) && - Objects.equals(this.february, form1099KListItem.february) && - Objects.equals(this.march, form1099KListItem.march) && - Objects.equals(this.april, form1099KListItem.april) && - Objects.equals(this.may, form1099KListItem.may) && - Objects.equals(this.june, form1099KListItem.june) && - Objects.equals(this.july, form1099KListItem.july) && - Objects.equals(this.august, form1099KListItem.august) && - Objects.equals(this.sept, form1099KListItem.sept) && - Objects.equals(this.october, form1099KListItem.october) && - Objects.equals(this.november, form1099KListItem.november) && - Objects.equals(this.december, form1099KListItem.december) && - Objects.equals(this.issuerReferenceId, form1099KListItem.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099KListItem.issuerTin) && - Objects.equals(this.taxYear, form1099KListItem.taxYear) && - Objects.equals(this.issuerId, form1099KListItem.issuerId) && - Objects.equals(this.referenceId, form1099KListItem.referenceId) && - Objects.equals(this.recipientTin, form1099KListItem.recipientTin) && - Objects.equals(this.recipientName, form1099KListItem.recipientName) && - Objects.equals(this.tinType, form1099KListItem.tinType) && - Objects.equals(this.recipientSecondName, form1099KListItem.recipientSecondName) && - Objects.equals(this.address, form1099KListItem.address) && - Objects.equals(this.address2, form1099KListItem.address2) && - Objects.equals(this.city, form1099KListItem.city) && - Objects.equals(this.state, form1099KListItem.state) && - Objects.equals(this.zip, form1099KListItem.zip) && - Objects.equals(this.email, form1099KListItem.email) && - Objects.equals(this.accountNumber, form1099KListItem.accountNumber) && - Objects.equals(this.officeCode, form1099KListItem.officeCode) && - Objects.equals(this.nonUsProvince, form1099KListItem.nonUsProvince) && - Objects.equals(this.countryCode, form1099KListItem.countryCode) && - Objects.equals(this.federalEFile, form1099KListItem.federalEFile) && - Objects.equals(this.postalMail, form1099KListItem.postalMail) && - Objects.equals(this.stateEFile, form1099KListItem.stateEFile) && - Objects.equals(this.tinMatch, form1099KListItem.tinMatch) && - Objects.equals(this.noTin, form1099KListItem.noTin) && - Objects.equals(this.secondTinNotice, form1099KListItem.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, form1099KListItem.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, form1099KListItem.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099KListItem.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, sept, october, november, december, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099KListItem {\n"); - sb.append(" filerType: ").append(toIndentedString(filerType)).append("\n"); - sb.append(" paymentType: ").append(toIndentedString(paymentType)).append("\n"); - sb.append(" paymentSettlementEntityNamePhoneNumber: ").append(toIndentedString(paymentSettlementEntityNamePhoneNumber)).append("\n"); - sb.append(" grossAmountPaymentCard: ").append(toIndentedString(grossAmountPaymentCard)).append("\n"); - sb.append(" cardNotPresentTransactions: ").append(toIndentedString(cardNotPresentTransactions)).append("\n"); - sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); - sb.append(" paymentTransactionNumber: ").append(toIndentedString(paymentTransactionNumber)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" january: ").append(toIndentedString(january)).append("\n"); - sb.append(" february: ").append(toIndentedString(february)).append("\n"); - sb.append(" march: ").append(toIndentedString(march)).append("\n"); - sb.append(" april: ").append(toIndentedString(april)).append("\n"); - sb.append(" may: ").append(toIndentedString(may)).append("\n"); - sb.append(" june: ").append(toIndentedString(june)).append("\n"); - sb.append(" july: ").append(toIndentedString(july)).append("\n"); - sb.append(" august: ").append(toIndentedString(august)).append("\n"); - sb.append(" sept: ").append(toIndentedString(sept)).append("\n"); - sb.append(" october: ").append(toIndentedString(october)).append("\n"); - sb.append(" november: ").append(toIndentedString(november)).append("\n"); - sb.append(" december: ").append(toIndentedString(december)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("taxYear"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099KListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099KListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099KListItem is not found in the empty JSON string", Form1099KListItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099KListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099KListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099KListItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) && !jsonObj.get("filerType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `filerType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("filerType").toString())); - } - // validate the optional field `filerType` - if (jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) { - FilerTypeEnum.validateJsonElement(jsonObj.get("filerType")); - } - if ((jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) && !jsonObj.get("paymentType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentType").toString())); - } - // validate the optional field `paymentType` - if (jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) { - PaymentTypeEnum.validateJsonElement(jsonObj.get("paymentType")); - } - if ((jsonObj.get("paymentSettlementEntityNamePhoneNumber") != null && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonNull()) && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentSettlementEntityNamePhoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentSettlementEntityNamePhoneNumber").toString())); - } - if ((jsonObj.get("merchantCategoryCode") != null && !jsonObj.get("merchantCategoryCode").isJsonNull()) && !jsonObj.get("merchantCategoryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `merchantCategoryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("merchantCategoryCode").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099KListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099KListItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099KListItem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099KListItem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099KListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099KListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099KListItem - * @throws IOException if the JSON string is invalid with respect to Form1099KListItem - */ - public static Form1099KListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099KListItem.class); - } - - /** - * Convert an instance of Form1099KListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItemResponse.java deleted file mode 100644 index 1362a68..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItemResponse.java +++ /dev/null @@ -1,1911 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099KListItemResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099KListItemResponse { - /** - * Filer type (PSE or EPF) - */ - @JsonAdapter(FilerTypeEnum.Adapter.class) - public enum FilerTypeEnum { - PSE("PSE"), - - EPF("EPF"), - - OTHER("Other"); - - private String value; - - FilerTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FilerTypeEnum fromValue(String value) { - for (FilerTypeEnum b : FilerTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FilerTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FilerTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FilerTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FilerTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FILER_TYPE = "filerType"; - @SerializedName(SERIALIZED_NAME_FILER_TYPE) - private FilerTypeEnum filerType; - - /** - * Payment type (payment card or third party network) - */ - @JsonAdapter(PaymentTypeEnum.Adapter.class) - public enum PaymentTypeEnum { - MERCHANT_PAYMENT_CARD("MerchantPaymentCard"), - - THIRD_PARTY_NETWORK("ThirdPartyNetwork"); - - private String value; - - PaymentTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PaymentTypeEnum fromValue(String value) { - for (PaymentTypeEnum b : PaymentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PaymentTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PaymentTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PaymentTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PaymentTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PAYMENT_TYPE = "paymentType"; - @SerializedName(SERIALIZED_NAME_PAYMENT_TYPE) - private PaymentTypeEnum paymentType; - - public static final String SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME_PHONE_NUMBER = "paymentSettlementEntityNamePhoneNumber"; - @SerializedName(SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME_PHONE_NUMBER) - private String paymentSettlementEntityNamePhoneNumber; - - public static final String SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD = "grossAmountPaymentCard"; - @SerializedName(SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD) - private Double grossAmountPaymentCard; - - public static final String SERIALIZED_NAME_CARD_NOT_PRESENT_TRANSACTIONS = "cardNotPresentTransactions"; - @SerializedName(SERIALIZED_NAME_CARD_NOT_PRESENT_TRANSACTIONS) - private Double cardNotPresentTransactions; - - public static final String SERIALIZED_NAME_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; - @SerializedName(SERIALIZED_NAME_MERCHANT_CATEGORY_CODE) - private String merchantCategoryCode; - - public static final String SERIALIZED_NAME_PAYMENT_TRANSACTION_NUMBER = "paymentTransactionNumber"; - @SerializedName(SERIALIZED_NAME_PAYMENT_TRANSACTION_NUMBER) - private Double paymentTransactionNumber; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_JANUARY = "january"; - @SerializedName(SERIALIZED_NAME_JANUARY) - private Double january; - - public static final String SERIALIZED_NAME_FEBRUARY = "february"; - @SerializedName(SERIALIZED_NAME_FEBRUARY) - private Double february; - - public static final String SERIALIZED_NAME_MARCH = "march"; - @SerializedName(SERIALIZED_NAME_MARCH) - private Double march; - - public static final String SERIALIZED_NAME_APRIL = "april"; - @SerializedName(SERIALIZED_NAME_APRIL) - private Double april; - - public static final String SERIALIZED_NAME_MAY = "may"; - @SerializedName(SERIALIZED_NAME_MAY) - private Double may; - - public static final String SERIALIZED_NAME_JUNE = "june"; - @SerializedName(SERIALIZED_NAME_JUNE) - private Double june; - - public static final String SERIALIZED_NAME_JULY = "july"; - @SerializedName(SERIALIZED_NAME_JULY) - private Double july; - - public static final String SERIALIZED_NAME_AUGUST = "august"; - @SerializedName(SERIALIZED_NAME_AUGUST) - private Double august; - - public static final String SERIALIZED_NAME_SEPT = "sept"; - @SerializedName(SERIALIZED_NAME_SEPT) - private Double sept; - - public static final String SERIALIZED_NAME_OCTOBER = "october"; - @SerializedName(SERIALIZED_NAME_OCTOBER) - private Double october; - - public static final String SERIALIZED_NAME_NOVEMBER = "november"; - @SerializedName(SERIALIZED_NAME_NOVEMBER) - private Double november; - - public static final String SERIALIZED_NAME_DECEMBER = "december"; - @SerializedName(SERIALIZED_NAME_DECEMBER) - private Double december; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - public Form1099KListItemResponse() { - } - - public Form1099KListItemResponse( - String id, - StatusDetail federalEfileStatus, - List stateEfileStatus, - StatusDetail postalMailStatus, - StatusDetail tinMatchStatus, - StatusDetail addressVerificationStatus, - StatusDetail eDeliveryStatus, - List validationErrors, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.id = id; - this.federalEfileStatus = federalEfileStatus; - this.stateEfileStatus = stateEfileStatus; - this.postalMailStatus = postalMailStatus; - this.tinMatchStatus = tinMatchStatus; - this.addressVerificationStatus = addressVerificationStatus; - this.eDeliveryStatus = eDeliveryStatus; - this.validationErrors = validationErrors; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - public Form1099KListItemResponse filerType(FilerTypeEnum filerType) { - this.filerType = filerType; - return this; - } - - /** - * Filer type (PSE or EPF) - * @return filerType - */ - @javax.annotation.Nullable - public FilerTypeEnum getFilerType() { - return filerType; - } - - public void setFilerType(FilerTypeEnum filerType) { - this.filerType = filerType; - } - - - public Form1099KListItemResponse paymentType(PaymentTypeEnum paymentType) { - this.paymentType = paymentType; - return this; - } - - /** - * Payment type (payment card or third party network) - * @return paymentType - */ - @javax.annotation.Nullable - public PaymentTypeEnum getPaymentType() { - return paymentType; - } - - public void setPaymentType(PaymentTypeEnum paymentType) { - this.paymentType = paymentType; - } - - - public Form1099KListItemResponse paymentSettlementEntityNamePhoneNumber(String paymentSettlementEntityNamePhoneNumber) { - this.paymentSettlementEntityNamePhoneNumber = paymentSettlementEntityNamePhoneNumber; - return this; - } - - /** - * Payment settlement entity name and phone number - * @return paymentSettlementEntityNamePhoneNumber - */ - @javax.annotation.Nullable - public String getPaymentSettlementEntityNamePhoneNumber() { - return paymentSettlementEntityNamePhoneNumber; - } - - public void setPaymentSettlementEntityNamePhoneNumber(String paymentSettlementEntityNamePhoneNumber) { - this.paymentSettlementEntityNamePhoneNumber = paymentSettlementEntityNamePhoneNumber; - } - - - public Form1099KListItemResponse grossAmountPaymentCard(Double grossAmountPaymentCard) { - this.grossAmountPaymentCard = grossAmountPaymentCard; - return this; - } - - /** - * Gross amount of payment card/third party network transactions - * @return grossAmountPaymentCard - */ - @javax.annotation.Nullable - public Double getGrossAmountPaymentCard() { - return grossAmountPaymentCard; - } - - public void setGrossAmountPaymentCard(Double grossAmountPaymentCard) { - this.grossAmountPaymentCard = grossAmountPaymentCard; - } - - - public Form1099KListItemResponse cardNotPresentTransactions(Double cardNotPresentTransactions) { - this.cardNotPresentTransactions = cardNotPresentTransactions; - return this; - } - - /** - * Card not present transactions - * @return cardNotPresentTransactions - */ - @javax.annotation.Nullable - public Double getCardNotPresentTransactions() { - return cardNotPresentTransactions; - } - - public void setCardNotPresentTransactions(Double cardNotPresentTransactions) { - this.cardNotPresentTransactions = cardNotPresentTransactions; - } - - - public Form1099KListItemResponse merchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - return this; - } - - /** - * Merchant category code - * @return merchantCategoryCode - */ - @javax.annotation.Nullable - public String getMerchantCategoryCode() { - return merchantCategoryCode; - } - - public void setMerchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - } - - - public Form1099KListItemResponse paymentTransactionNumber(Double paymentTransactionNumber) { - this.paymentTransactionNumber = paymentTransactionNumber; - return this; - } - - /** - * Number of payment transactions - * @return paymentTransactionNumber - */ - @javax.annotation.Nullable - public Double getPaymentTransactionNumber() { - return paymentTransactionNumber; - } - - public void setPaymentTransactionNumber(Double paymentTransactionNumber) { - this.paymentTransactionNumber = paymentTransactionNumber; - } - - - public Form1099KListItemResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099KListItemResponse january(Double january) { - this.january = january; - return this; - } - - /** - * January gross payments - * @return january - */ - @javax.annotation.Nullable - public Double getJanuary() { - return january; - } - - public void setJanuary(Double january) { - this.january = january; - } - - - public Form1099KListItemResponse february(Double february) { - this.february = february; - return this; - } - - /** - * February gross payments - * @return february - */ - @javax.annotation.Nullable - public Double getFebruary() { - return february; - } - - public void setFebruary(Double february) { - this.february = february; - } - - - public Form1099KListItemResponse march(Double march) { - this.march = march; - return this; - } - - /** - * March gross payments - * @return march - */ - @javax.annotation.Nullable - public Double getMarch() { - return march; - } - - public void setMarch(Double march) { - this.march = march; - } - - - public Form1099KListItemResponse april(Double april) { - this.april = april; - return this; - } - - /** - * April gross payments - * @return april - */ - @javax.annotation.Nullable - public Double getApril() { - return april; - } - - public void setApril(Double april) { - this.april = april; - } - - - public Form1099KListItemResponse may(Double may) { - this.may = may; - return this; - } - - /** - * May gross payments - * @return may - */ - @javax.annotation.Nullable - public Double getMay() { - return may; - } - - public void setMay(Double may) { - this.may = may; - } - - - public Form1099KListItemResponse june(Double june) { - this.june = june; - return this; - } - - /** - * June gross payments - * @return june - */ - @javax.annotation.Nullable - public Double getJune() { - return june; - } - - public void setJune(Double june) { - this.june = june; - } - - - public Form1099KListItemResponse july(Double july) { - this.july = july; - return this; - } - - /** - * July gross payments - * @return july - */ - @javax.annotation.Nullable - public Double getJuly() { - return july; - } - - public void setJuly(Double july) { - this.july = july; - } - - - public Form1099KListItemResponse august(Double august) { - this.august = august; - return this; - } - - /** - * August gross payments - * @return august - */ - @javax.annotation.Nullable - public Double getAugust() { - return august; - } - - public void setAugust(Double august) { - this.august = august; - } - - - public Form1099KListItemResponse sept(Double sept) { - this.sept = sept; - return this; - } - - /** - * September gross payments - * @return sept - */ - @javax.annotation.Nullable - public Double getSept() { - return sept; - } - - public void setSept(Double sept) { - this.sept = sept; - } - - - public Form1099KListItemResponse october(Double october) { - this.october = october; - return this; - } - - /** - * October gross payments - * @return october - */ - @javax.annotation.Nullable - public Double getOctober() { - return october; - } - - public void setOctober(Double october) { - this.october = october; - } - - - public Form1099KListItemResponse november(Double november) { - this.november = november; - return this; - } - - /** - * November gross payments - * @return november - */ - @javax.annotation.Nullable - public Double getNovember() { - return november; - } - - public void setNovember(Double november) { - this.november = november; - } - - - public Form1099KListItemResponse december(Double december) { - this.december = december; - return this; - } - - /** - * December gross payments - * @return december - */ - @javax.annotation.Nullable - public Double getDecember() { - return december; - } - - public void setDecember(Double december) { - this.december = december; - } - - - /** - * ID of the form - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - - public Form1099KListItemResponse type(String type) { - this.type = type; - return this; - } - - /** - * Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public Form1099KListItemResponse issuerId(Integer issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nonnull - public Integer getIssuerId() { - return issuerId; - } - - public void setIssuerId(Integer issuerId) { - this.issuerId = issuerId; - } - - - public Form1099KListItemResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099KListItemResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099KListItemResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099KListItemResponse federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Boolean indicating that federal e-filing has been scheduled for this form - * @return federalEfile - */ - @javax.annotation.Nonnull - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - /** - * Federal e-file status - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - - - public Form1099KListItemResponse stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - return this; - } - - /** - * Boolean indicating that state e-filing has been scheduled for this form - * @return stateEfile - */ - @javax.annotation.Nonnull - public Boolean getStateEfile() { - return stateEfile; - } - - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - } - - - /** - * State e-file status - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - - - public Form1099KListItemResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient has been scheduled for this form - * @return postalMail - */ - @javax.annotation.Nonnull - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - /** - * Postal mail to recipient status - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - - - public Form1099KListItemResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching has been scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nonnull - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - /** - * TIN Match status - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - - - public Form1099KListItemResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification has been scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nonnull - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - /** - * Address verification status - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - - - /** - * EDelivery status - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - - - public Form1099KListItemResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099KListItemResponse email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099KListItemResponse tinType(String tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public String getTinType() { - return tinType; - } - - public void setTinType(String tinType) { - this.tinType = tinType; - } - - - public Form1099KListItemResponse tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Recipient Tax ID Number - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public Form1099KListItemResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099KListItemResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second Tin Notice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099KListItemResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099KListItemResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099KListItemResponse address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099KListItemResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099KListItemResponse city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099KListItemResponse state(String state) { - this.state = state; - return this; - } - - /** - * US state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099KListItemResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099KListItemResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099KListItemResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099KListItemResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account Number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099KListItemResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office Code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099KListItemResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - /** - * Validation errors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - - - /** - * Creation time - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - /** - * Update time - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - public Form1099KListItemResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099KListItemResponse form1099KListItemResponse = (Form1099KListItemResponse) o; - return Objects.equals(this.filerType, form1099KListItemResponse.filerType) && - Objects.equals(this.paymentType, form1099KListItemResponse.paymentType) && - Objects.equals(this.paymentSettlementEntityNamePhoneNumber, form1099KListItemResponse.paymentSettlementEntityNamePhoneNumber) && - Objects.equals(this.grossAmountPaymentCard, form1099KListItemResponse.grossAmountPaymentCard) && - Objects.equals(this.cardNotPresentTransactions, form1099KListItemResponse.cardNotPresentTransactions) && - Objects.equals(this.merchantCategoryCode, form1099KListItemResponse.merchantCategoryCode) && - Objects.equals(this.paymentTransactionNumber, form1099KListItemResponse.paymentTransactionNumber) && - Objects.equals(this.federalIncomeTaxWithheld, form1099KListItemResponse.federalIncomeTaxWithheld) && - Objects.equals(this.january, form1099KListItemResponse.january) && - Objects.equals(this.february, form1099KListItemResponse.february) && - Objects.equals(this.march, form1099KListItemResponse.march) && - Objects.equals(this.april, form1099KListItemResponse.april) && - Objects.equals(this.may, form1099KListItemResponse.may) && - Objects.equals(this.june, form1099KListItemResponse.june) && - Objects.equals(this.july, form1099KListItemResponse.july) && - Objects.equals(this.august, form1099KListItemResponse.august) && - Objects.equals(this.sept, form1099KListItemResponse.sept) && - Objects.equals(this.october, form1099KListItemResponse.october) && - Objects.equals(this.november, form1099KListItemResponse.november) && - Objects.equals(this.december, form1099KListItemResponse.december) && - Objects.equals(this.id, form1099KListItemResponse.id) && - Objects.equals(this.type, form1099KListItemResponse.type) && - Objects.equals(this.issuerId, form1099KListItemResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099KListItemResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099KListItemResponse.issuerTin) && - Objects.equals(this.taxYear, form1099KListItemResponse.taxYear) && - Objects.equals(this.federalEfile, form1099KListItemResponse.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099KListItemResponse.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099KListItemResponse.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099KListItemResponse.stateEfileStatus) && - Objects.equals(this.postalMail, form1099KListItemResponse.postalMail) && - Objects.equals(this.postalMailStatus, form1099KListItemResponse.postalMailStatus) && - Objects.equals(this.tinMatch, form1099KListItemResponse.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099KListItemResponse.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099KListItemResponse.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099KListItemResponse.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099KListItemResponse.eDeliveryStatus) && - Objects.equals(this.referenceId, form1099KListItemResponse.referenceId) && - Objects.equals(this.email, form1099KListItemResponse.email) && - Objects.equals(this.tinType, form1099KListItemResponse.tinType) && - Objects.equals(this.tin, form1099KListItemResponse.tin) && - Objects.equals(this.noTin, form1099KListItemResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099KListItemResponse.secondTinNotice) && - Objects.equals(this.recipientName, form1099KListItemResponse.recipientName) && - Objects.equals(this.recipientSecondName, form1099KListItemResponse.recipientSecondName) && - Objects.equals(this.address, form1099KListItemResponse.address) && - Objects.equals(this.address2, form1099KListItemResponse.address2) && - Objects.equals(this.city, form1099KListItemResponse.city) && - Objects.equals(this.state, form1099KListItemResponse.state) && - Objects.equals(this.zip, form1099KListItemResponse.zip) && - Objects.equals(this.nonUsProvince, form1099KListItemResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099KListItemResponse.countryCode) && - Objects.equals(this.accountNumber, form1099KListItemResponse.accountNumber) && - Objects.equals(this.officeCode, form1099KListItemResponse.officeCode) && - Objects.equals(this.fatcaFilingRequirement, form1099KListItemResponse.fatcaFilingRequirement) && - Objects.equals(this.validationErrors, form1099KListItemResponse.validationErrors) && - Objects.equals(this.createdAt, form1099KListItemResponse.createdAt) && - Objects.equals(this.updatedAt, form1099KListItemResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099KListItemResponse.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, sept, october, november, december, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, fatcaFilingRequirement, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099KListItemResponse {\n"); - sb.append(" filerType: ").append(toIndentedString(filerType)).append("\n"); - sb.append(" paymentType: ").append(toIndentedString(paymentType)).append("\n"); - sb.append(" paymentSettlementEntityNamePhoneNumber: ").append(toIndentedString(paymentSettlementEntityNamePhoneNumber)).append("\n"); - sb.append(" grossAmountPaymentCard: ").append(toIndentedString(grossAmountPaymentCard)).append("\n"); - sb.append(" cardNotPresentTransactions: ").append(toIndentedString(cardNotPresentTransactions)).append("\n"); - sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); - sb.append(" paymentTransactionNumber: ").append(toIndentedString(paymentTransactionNumber)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" january: ").append(toIndentedString(january)).append("\n"); - sb.append(" february: ").append(toIndentedString(february)).append("\n"); - sb.append(" march: ").append(toIndentedString(march)).append("\n"); - sb.append(" april: ").append(toIndentedString(april)).append("\n"); - sb.append(" may: ").append(toIndentedString(may)).append("\n"); - sb.append(" june: ").append(toIndentedString(june)).append("\n"); - sb.append(" july: ").append(toIndentedString(july)).append("\n"); - sb.append(" august: ").append(toIndentedString(august)).append("\n"); - sb.append(" sept: ").append(toIndentedString(sept)).append("\n"); - sb.append(" october: ").append(toIndentedString(october)).append("\n"); - sb.append(" november: ").append(toIndentedString(november)).append("\n"); - sb.append(" december: ").append(toIndentedString(december)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("recipientName"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("validationErrors"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("issuerId"); - openapiRequiredFields.add("federalEfile"); - openapiRequiredFields.add("stateEfile"); - openapiRequiredFields.add("postalMail"); - openapiRequiredFields.add("tinMatch"); - openapiRequiredFields.add("addressVerification"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099KListItemResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099KListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099KListItemResponse is not found in the empty JSON string", Form1099KListItemResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099KListItemResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099KListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099KListItemResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) && !jsonObj.get("filerType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `filerType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("filerType").toString())); - } - // validate the optional field `filerType` - if (jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) { - FilerTypeEnum.validateJsonElement(jsonObj.get("filerType")); - } - if ((jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) && !jsonObj.get("paymentType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentType").toString())); - } - // validate the optional field `paymentType` - if (jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) { - PaymentTypeEnum.validateJsonElement(jsonObj.get("paymentType")); - } - if ((jsonObj.get("paymentSettlementEntityNamePhoneNumber") != null && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonNull()) && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentSettlementEntityNamePhoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentSettlementEntityNamePhoneNumber").toString())); - } - if ((jsonObj.get("merchantCategoryCode") != null && !jsonObj.get("merchantCategoryCode").isJsonNull()) && !jsonObj.get("merchantCategoryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `merchantCategoryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("merchantCategoryCode").toString())); - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099KListItemResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099KListItemResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099KListItemResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099KListItemResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099KListItemResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099KListItemResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099KListItemResponse - * @throws IOException if the JSON string is invalid with respect to Form1099KListItemResponse - */ - public static Form1099KListItemResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099KListItemResponse.class); - } - - /** - * Convert an instance of Form1099KListItemResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KRequest.java deleted file mode 100644 index 82b585e..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KRequest.java +++ /dev/null @@ -1,1683 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099KRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099KRequest { - /** - * Filer type (PSE or EPF) - */ - @JsonAdapter(FilerTypeEnum.Adapter.class) - public enum FilerTypeEnum { - PSE("PSE"), - - EPF("EPF"), - - OTHER("Other"); - - private String value; - - FilerTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FilerTypeEnum fromValue(String value) { - for (FilerTypeEnum b : FilerTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FilerTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FilerTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FilerTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FilerTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FILER_TYPE = "filerType"; - @SerializedName(SERIALIZED_NAME_FILER_TYPE) - private FilerTypeEnum filerType; - - /** - * Payment type (payment card or third party network) - */ - @JsonAdapter(PaymentTypeEnum.Adapter.class) - public enum PaymentTypeEnum { - MERCHANT_PAYMENT_CARD("MerchantPaymentCard"), - - THIRD_PARTY_NETWORK("ThirdPartyNetwork"); - - private String value; - - PaymentTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PaymentTypeEnum fromValue(String value) { - for (PaymentTypeEnum b : PaymentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PaymentTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PaymentTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PaymentTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PaymentTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PAYMENT_TYPE = "paymentType"; - @SerializedName(SERIALIZED_NAME_PAYMENT_TYPE) - private PaymentTypeEnum paymentType; - - public static final String SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME_PHONE_NUMBER = "paymentSettlementEntityNamePhoneNumber"; - @SerializedName(SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME_PHONE_NUMBER) - private String paymentSettlementEntityNamePhoneNumber; - - public static final String SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD = "grossAmountPaymentCard"; - @SerializedName(SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD) - private Double grossAmountPaymentCard; - - public static final String SERIALIZED_NAME_CARD_NOT_PRESENT_TRANSACTIONS = "cardNotPresentTransactions"; - @SerializedName(SERIALIZED_NAME_CARD_NOT_PRESENT_TRANSACTIONS) - private Double cardNotPresentTransactions; - - public static final String SERIALIZED_NAME_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; - @SerializedName(SERIALIZED_NAME_MERCHANT_CATEGORY_CODE) - private String merchantCategoryCode; - - public static final String SERIALIZED_NAME_PAYMENT_TRANSACTION_NUMBER = "paymentTransactionNumber"; - @SerializedName(SERIALIZED_NAME_PAYMENT_TRANSACTION_NUMBER) - private Double paymentTransactionNumber; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_JANUARY = "january"; - @SerializedName(SERIALIZED_NAME_JANUARY) - private Double january; - - public static final String SERIALIZED_NAME_FEBRUARY = "february"; - @SerializedName(SERIALIZED_NAME_FEBRUARY) - private Double february; - - public static final String SERIALIZED_NAME_MARCH = "march"; - @SerializedName(SERIALIZED_NAME_MARCH) - private Double march; - - public static final String SERIALIZED_NAME_APRIL = "april"; - @SerializedName(SERIALIZED_NAME_APRIL) - private Double april; - - public static final String SERIALIZED_NAME_MAY = "may"; - @SerializedName(SERIALIZED_NAME_MAY) - private Double may; - - public static final String SERIALIZED_NAME_JUNE = "june"; - @SerializedName(SERIALIZED_NAME_JUNE) - private Double june; - - public static final String SERIALIZED_NAME_JULY = "july"; - @SerializedName(SERIALIZED_NAME_JULY) - private Double july; - - public static final String SERIALIZED_NAME_AUGUST = "august"; - @SerializedName(SERIALIZED_NAME_AUGUST) - private Double august; - - public static final String SERIALIZED_NAME_SEPT = "sept"; - @SerializedName(SERIALIZED_NAME_SEPT) - private Double sept; - - public static final String SERIALIZED_NAME_OCTOBER = "october"; - @SerializedName(SERIALIZED_NAME_OCTOBER) - private Double october; - - public static final String SERIALIZED_NAME_NOVEMBER = "november"; - @SerializedName(SERIALIZED_NAME_NOVEMBER) - private Double november; - - public static final String SERIALIZED_NAME_DECEMBER = "december"; - @SerializedName(SERIALIZED_NAME_DECEMBER) - private Double december; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099KRequest() { - } - - public Form1099KRequest filerType(FilerTypeEnum filerType) { - this.filerType = filerType; - return this; - } - - /** - * Filer type (PSE or EPF) - * @return filerType - */ - @javax.annotation.Nullable - public FilerTypeEnum getFilerType() { - return filerType; - } - - public void setFilerType(FilerTypeEnum filerType) { - this.filerType = filerType; - } - - - public Form1099KRequest paymentType(PaymentTypeEnum paymentType) { - this.paymentType = paymentType; - return this; - } - - /** - * Payment type (payment card or third party network) - * @return paymentType - */ - @javax.annotation.Nullable - public PaymentTypeEnum getPaymentType() { - return paymentType; - } - - public void setPaymentType(PaymentTypeEnum paymentType) { - this.paymentType = paymentType; - } - - - public Form1099KRequest paymentSettlementEntityNamePhoneNumber(String paymentSettlementEntityNamePhoneNumber) { - this.paymentSettlementEntityNamePhoneNumber = paymentSettlementEntityNamePhoneNumber; - return this; - } - - /** - * Payment settlement entity name and phone number - * @return paymentSettlementEntityNamePhoneNumber - */ - @javax.annotation.Nullable - public String getPaymentSettlementEntityNamePhoneNumber() { - return paymentSettlementEntityNamePhoneNumber; - } - - public void setPaymentSettlementEntityNamePhoneNumber(String paymentSettlementEntityNamePhoneNumber) { - this.paymentSettlementEntityNamePhoneNumber = paymentSettlementEntityNamePhoneNumber; - } - - - public Form1099KRequest grossAmountPaymentCard(Double grossAmountPaymentCard) { - this.grossAmountPaymentCard = grossAmountPaymentCard; - return this; - } - - /** - * Gross amount of payment card/third party network transactions - * @return grossAmountPaymentCard - */ - @javax.annotation.Nullable - public Double getGrossAmountPaymentCard() { - return grossAmountPaymentCard; - } - - public void setGrossAmountPaymentCard(Double grossAmountPaymentCard) { - this.grossAmountPaymentCard = grossAmountPaymentCard; - } - - - public Form1099KRequest cardNotPresentTransactions(Double cardNotPresentTransactions) { - this.cardNotPresentTransactions = cardNotPresentTransactions; - return this; - } - - /** - * Card not present transactions - * @return cardNotPresentTransactions - */ - @javax.annotation.Nullable - public Double getCardNotPresentTransactions() { - return cardNotPresentTransactions; - } - - public void setCardNotPresentTransactions(Double cardNotPresentTransactions) { - this.cardNotPresentTransactions = cardNotPresentTransactions; - } - - - public Form1099KRequest merchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - return this; - } - - /** - * Merchant category code - * @return merchantCategoryCode - */ - @javax.annotation.Nullable - public String getMerchantCategoryCode() { - return merchantCategoryCode; - } - - public void setMerchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - } - - - public Form1099KRequest paymentTransactionNumber(Double paymentTransactionNumber) { - this.paymentTransactionNumber = paymentTransactionNumber; - return this; - } - - /** - * Number of payment transactions - * @return paymentTransactionNumber - */ - @javax.annotation.Nullable - public Double getPaymentTransactionNumber() { - return paymentTransactionNumber; - } - - public void setPaymentTransactionNumber(Double paymentTransactionNumber) { - this.paymentTransactionNumber = paymentTransactionNumber; - } - - - public Form1099KRequest federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099KRequest january(Double january) { - this.january = january; - return this; - } - - /** - * January gross payments - * @return january - */ - @javax.annotation.Nullable - public Double getJanuary() { - return january; - } - - public void setJanuary(Double january) { - this.january = january; - } - - - public Form1099KRequest february(Double february) { - this.february = february; - return this; - } - - /** - * February gross payments - * @return february - */ - @javax.annotation.Nullable - public Double getFebruary() { - return february; - } - - public void setFebruary(Double february) { - this.february = february; - } - - - public Form1099KRequest march(Double march) { - this.march = march; - return this; - } - - /** - * March gross payments - * @return march - */ - @javax.annotation.Nullable - public Double getMarch() { - return march; - } - - public void setMarch(Double march) { - this.march = march; - } - - - public Form1099KRequest april(Double april) { - this.april = april; - return this; - } - - /** - * April gross payments - * @return april - */ - @javax.annotation.Nullable - public Double getApril() { - return april; - } - - public void setApril(Double april) { - this.april = april; - } - - - public Form1099KRequest may(Double may) { - this.may = may; - return this; - } - - /** - * May gross payments - * @return may - */ - @javax.annotation.Nullable - public Double getMay() { - return may; - } - - public void setMay(Double may) { - this.may = may; - } - - - public Form1099KRequest june(Double june) { - this.june = june; - return this; - } - - /** - * June gross payments - * @return june - */ - @javax.annotation.Nullable - public Double getJune() { - return june; - } - - public void setJune(Double june) { - this.june = june; - } - - - public Form1099KRequest july(Double july) { - this.july = july; - return this; - } - - /** - * July gross payments - * @return july - */ - @javax.annotation.Nullable - public Double getJuly() { - return july; - } - - public void setJuly(Double july) { - this.july = july; - } - - - public Form1099KRequest august(Double august) { - this.august = august; - return this; - } - - /** - * August gross payments - * @return august - */ - @javax.annotation.Nullable - public Double getAugust() { - return august; - } - - public void setAugust(Double august) { - this.august = august; - } - - - public Form1099KRequest sept(Double sept) { - this.sept = sept; - return this; - } - - /** - * September gross payments - * @return sept - */ - @javax.annotation.Nullable - public Double getSept() { - return sept; - } - - public void setSept(Double sept) { - this.sept = sept; - } - - - public Form1099KRequest october(Double october) { - this.october = october; - return this; - } - - /** - * October gross payments - * @return october - */ - @javax.annotation.Nullable - public Double getOctober() { - return october; - } - - public void setOctober(Double october) { - this.october = october; - } - - - public Form1099KRequest november(Double november) { - this.november = november; - return this; - } - - /** - * November gross payments - * @return november - */ - @javax.annotation.Nullable - public Double getNovember() { - return november; - } - - public void setNovember(Double november) { - this.november = november; - } - - - public Form1099KRequest december(Double december) { - this.december = december; - return this; - } - - /** - * December gross payments - * @return december - */ - @javax.annotation.Nullable - public Double getDecember() { - return december; - } - - public void setDecember(Double december) { - this.december = december; - } - - - public Form1099KRequest type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Form1099KRequest issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099KRequest referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099KRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099KRequest recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099KRequest tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099KRequest recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099KRequest address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099KRequest address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099KRequest city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099KRequest state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099KRequest zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099KRequest email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099KRequest accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099KRequest officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099KRequest nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099KRequest countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099KRequest federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099KRequest postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099KRequest stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099KRequest tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099KRequest noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099KRequest secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099KRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099KRequest addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099KRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099KRequest form1099KRequest = (Form1099KRequest) o; - return Objects.equals(this.filerType, form1099KRequest.filerType) && - Objects.equals(this.paymentType, form1099KRequest.paymentType) && - Objects.equals(this.paymentSettlementEntityNamePhoneNumber, form1099KRequest.paymentSettlementEntityNamePhoneNumber) && - Objects.equals(this.grossAmountPaymentCard, form1099KRequest.grossAmountPaymentCard) && - Objects.equals(this.cardNotPresentTransactions, form1099KRequest.cardNotPresentTransactions) && - Objects.equals(this.merchantCategoryCode, form1099KRequest.merchantCategoryCode) && - Objects.equals(this.paymentTransactionNumber, form1099KRequest.paymentTransactionNumber) && - Objects.equals(this.federalIncomeTaxWithheld, form1099KRequest.federalIncomeTaxWithheld) && - Objects.equals(this.january, form1099KRequest.january) && - Objects.equals(this.february, form1099KRequest.february) && - Objects.equals(this.march, form1099KRequest.march) && - Objects.equals(this.april, form1099KRequest.april) && - Objects.equals(this.may, form1099KRequest.may) && - Objects.equals(this.june, form1099KRequest.june) && - Objects.equals(this.july, form1099KRequest.july) && - Objects.equals(this.august, form1099KRequest.august) && - Objects.equals(this.sept, form1099KRequest.sept) && - Objects.equals(this.october, form1099KRequest.october) && - Objects.equals(this.november, form1099KRequest.november) && - Objects.equals(this.december, form1099KRequest.december) && - Objects.equals(this.type, form1099KRequest.type) && - Objects.equals(this.issuerId, form1099KRequest.issuerId) && - Objects.equals(this.referenceId, form1099KRequest.referenceId) && - Objects.equals(this.recipientTin, form1099KRequest.recipientTin) && - Objects.equals(this.recipientName, form1099KRequest.recipientName) && - Objects.equals(this.tinType, form1099KRequest.tinType) && - Objects.equals(this.recipientSecondName, form1099KRequest.recipientSecondName) && - Objects.equals(this.address, form1099KRequest.address) && - Objects.equals(this.address2, form1099KRequest.address2) && - Objects.equals(this.city, form1099KRequest.city) && - Objects.equals(this.state, form1099KRequest.state) && - Objects.equals(this.zip, form1099KRequest.zip) && - Objects.equals(this.email, form1099KRequest.email) && - Objects.equals(this.accountNumber, form1099KRequest.accountNumber) && - Objects.equals(this.officeCode, form1099KRequest.officeCode) && - Objects.equals(this.nonUsProvince, form1099KRequest.nonUsProvince) && - Objects.equals(this.countryCode, form1099KRequest.countryCode) && - Objects.equals(this.federalEFile, form1099KRequest.federalEFile) && - Objects.equals(this.postalMail, form1099KRequest.postalMail) && - Objects.equals(this.stateEFile, form1099KRequest.stateEFile) && - Objects.equals(this.tinMatch, form1099KRequest.tinMatch) && - Objects.equals(this.noTin, form1099KRequest.noTin) && - Objects.equals(this.secondTinNotice, form1099KRequest.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, form1099KRequest.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, form1099KRequest.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099KRequest.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, sept, october, november, december, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099KRequest {\n"); - sb.append(" filerType: ").append(toIndentedString(filerType)).append("\n"); - sb.append(" paymentType: ").append(toIndentedString(paymentType)).append("\n"); - sb.append(" paymentSettlementEntityNamePhoneNumber: ").append(toIndentedString(paymentSettlementEntityNamePhoneNumber)).append("\n"); - sb.append(" grossAmountPaymentCard: ").append(toIndentedString(grossAmountPaymentCard)).append("\n"); - sb.append(" cardNotPresentTransactions: ").append(toIndentedString(cardNotPresentTransactions)).append("\n"); - sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); - sb.append(" paymentTransactionNumber: ").append(toIndentedString(paymentTransactionNumber)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" january: ").append(toIndentedString(january)).append("\n"); - sb.append(" february: ").append(toIndentedString(february)).append("\n"); - sb.append(" march: ").append(toIndentedString(march)).append("\n"); - sb.append(" april: ").append(toIndentedString(april)).append("\n"); - sb.append(" may: ").append(toIndentedString(may)).append("\n"); - sb.append(" june: ").append(toIndentedString(june)).append("\n"); - sb.append(" july: ").append(toIndentedString(july)).append("\n"); - sb.append(" august: ").append(toIndentedString(august)).append("\n"); - sb.append(" sept: ").append(toIndentedString(sept)).append("\n"); - sb.append(" october: ").append(toIndentedString(october)).append("\n"); - sb.append(" november: ").append(toIndentedString(november)).append("\n"); - sb.append(" december: ").append(toIndentedString(december)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099KRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099KRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099KRequest is not found in the empty JSON string", Form1099KRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099KRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099KRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) && !jsonObj.get("filerType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `filerType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("filerType").toString())); - } - // validate the optional field `filerType` - if (jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) { - FilerTypeEnum.validateJsonElement(jsonObj.get("filerType")); - } - if ((jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) && !jsonObj.get("paymentType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentType").toString())); - } - // validate the optional field `paymentType` - if (jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) { - PaymentTypeEnum.validateJsonElement(jsonObj.get("paymentType")); - } - if ((jsonObj.get("paymentSettlementEntityNamePhoneNumber") != null && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonNull()) && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentSettlementEntityNamePhoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentSettlementEntityNamePhoneNumber").toString())); - } - if ((jsonObj.get("merchantCategoryCode") != null && !jsonObj.get("merchantCategoryCode").isJsonNull()) && !jsonObj.get("merchantCategoryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `merchantCategoryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("merchantCategoryCode").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099KRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099KRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099KRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099KRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099KRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099KRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099KRequest - * @throws IOException if the JSON string is invalid with respect to Form1099KRequest - */ - public static Form1099KRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099KRequest.class); - } - - /** - * Convert an instance of Form1099KRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KResponse.java deleted file mode 100644 index 933b185..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KResponse.java +++ /dev/null @@ -1,2073 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099KResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099KResponse { - /** - * Gets or Sets filerType - */ - @JsonAdapter(FilerTypeEnum.Adapter.class) - public enum FilerTypeEnum { - PSE("PSE"), - - EPF("EPF"), - - OTHER("Other"); - - private String value; - - FilerTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FilerTypeEnum fromValue(String value) { - for (FilerTypeEnum b : FilerTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FilerTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FilerTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FilerTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FilerTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FILER_TYPE = "filerType"; - @SerializedName(SERIALIZED_NAME_FILER_TYPE) - private FilerTypeEnum filerType; - - /** - * Gets or Sets paymentType - */ - @JsonAdapter(PaymentTypeEnum.Adapter.class) - public enum PaymentTypeEnum { - MERCHANT_PAYMENT_CARD("MerchantPaymentCard"), - - THIRD_PARTY_NETWORK("ThirdPartyNetwork"); - - private String value; - - PaymentTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static PaymentTypeEnum fromValue(String value) { - for (PaymentTypeEnum b : PaymentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final PaymentTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public PaymentTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return PaymentTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - PaymentTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_PAYMENT_TYPE = "paymentType"; - @SerializedName(SERIALIZED_NAME_PAYMENT_TYPE) - private PaymentTypeEnum paymentType; - - public static final String SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME_PHONE_NUMBER = "paymentSettlementEntityNamePhoneNumber"; - @SerializedName(SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME_PHONE_NUMBER) - private String paymentSettlementEntityNamePhoneNumber; - - public static final String SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD = "grossAmountPaymentCard"; - @SerializedName(SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD) - private Double grossAmountPaymentCard; - - public static final String SERIALIZED_NAME_CARD_NOT_PRESENT_TRANSACTIONS = "cardNotPresentTransactions"; - @SerializedName(SERIALIZED_NAME_CARD_NOT_PRESENT_TRANSACTIONS) - private Double cardNotPresentTransactions; - - public static final String SERIALIZED_NAME_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; - @SerializedName(SERIALIZED_NAME_MERCHANT_CATEGORY_CODE) - private String merchantCategoryCode; - - public static final String SERIALIZED_NAME_PAYMENT_TRANSACTION_NUMBER = "paymentTransactionNumber"; - @SerializedName(SERIALIZED_NAME_PAYMENT_TRANSACTION_NUMBER) - private Double paymentTransactionNumber; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_JANUARY = "january"; - @SerializedName(SERIALIZED_NAME_JANUARY) - private Double january; - - public static final String SERIALIZED_NAME_FEBRUARY = "february"; - @SerializedName(SERIALIZED_NAME_FEBRUARY) - private Double february; - - public static final String SERIALIZED_NAME_MARCH = "march"; - @SerializedName(SERIALIZED_NAME_MARCH) - private Double march; - - public static final String SERIALIZED_NAME_APRIL = "april"; - @SerializedName(SERIALIZED_NAME_APRIL) - private Double april; - - public static final String SERIALIZED_NAME_MAY = "may"; - @SerializedName(SERIALIZED_NAME_MAY) - private Double may; - - public static final String SERIALIZED_NAME_JUNE = "june"; - @SerializedName(SERIALIZED_NAME_JUNE) - private Double june; - - public static final String SERIALIZED_NAME_JULY = "july"; - @SerializedName(SERIALIZED_NAME_JULY) - private Double july; - - public static final String SERIALIZED_NAME_AUGUST = "august"; - @SerializedName(SERIALIZED_NAME_AUGUST) - private Double august; - - public static final String SERIALIZED_NAME_SEPT = "sept"; - @SerializedName(SERIALIZED_NAME_SEPT) - private Double sept; - - public static final String SERIALIZED_NAME_OCTOBER = "october"; - @SerializedName(SERIALIZED_NAME_OCTOBER) - private Double october; - - public static final String SERIALIZED_NAME_NOVEMBER = "november"; - @SerializedName(SERIALIZED_NAME_NOVEMBER) - private Double november; - - public static final String SERIALIZED_NAME_DECEMBER = "december"; - @SerializedName(SERIALIZED_NAME_DECEMBER) - private Double december; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - /** - * Gets or Sets tinType - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public Form1099KResponse() { - } - - public Form1099KResponse( - TypeEnum type - ) { - this(); - this.type = type; - } - - public Form1099KResponse filerType(FilerTypeEnum filerType) { - this.filerType = filerType; - return this; - } - - /** - * Get filerType - * @return filerType - */ - @javax.annotation.Nullable - public FilerTypeEnum getFilerType() { - return filerType; - } - - public void setFilerType(FilerTypeEnum filerType) { - this.filerType = filerType; - } - - - public Form1099KResponse paymentType(PaymentTypeEnum paymentType) { - this.paymentType = paymentType; - return this; - } - - /** - * Get paymentType - * @return paymentType - */ - @javax.annotation.Nullable - public PaymentTypeEnum getPaymentType() { - return paymentType; - } - - public void setPaymentType(PaymentTypeEnum paymentType) { - this.paymentType = paymentType; - } - - - public Form1099KResponse paymentSettlementEntityNamePhoneNumber(String paymentSettlementEntityNamePhoneNumber) { - this.paymentSettlementEntityNamePhoneNumber = paymentSettlementEntityNamePhoneNumber; - return this; - } - - /** - * Get paymentSettlementEntityNamePhoneNumber - * @return paymentSettlementEntityNamePhoneNumber - */ - @javax.annotation.Nullable - public String getPaymentSettlementEntityNamePhoneNumber() { - return paymentSettlementEntityNamePhoneNumber; - } - - public void setPaymentSettlementEntityNamePhoneNumber(String paymentSettlementEntityNamePhoneNumber) { - this.paymentSettlementEntityNamePhoneNumber = paymentSettlementEntityNamePhoneNumber; - } - - - public Form1099KResponse grossAmountPaymentCard(Double grossAmountPaymentCard) { - this.grossAmountPaymentCard = grossAmountPaymentCard; - return this; - } - - /** - * Get grossAmountPaymentCard - * @return grossAmountPaymentCard - */ - @javax.annotation.Nullable - public Double getGrossAmountPaymentCard() { - return grossAmountPaymentCard; - } - - public void setGrossAmountPaymentCard(Double grossAmountPaymentCard) { - this.grossAmountPaymentCard = grossAmountPaymentCard; - } - - - public Form1099KResponse cardNotPresentTransactions(Double cardNotPresentTransactions) { - this.cardNotPresentTransactions = cardNotPresentTransactions; - return this; - } - - /** - * Get cardNotPresentTransactions - * @return cardNotPresentTransactions - */ - @javax.annotation.Nullable - public Double getCardNotPresentTransactions() { - return cardNotPresentTransactions; - } - - public void setCardNotPresentTransactions(Double cardNotPresentTransactions) { - this.cardNotPresentTransactions = cardNotPresentTransactions; - } - - - public Form1099KResponse merchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - return this; - } - - /** - * Get merchantCategoryCode - * @return merchantCategoryCode - */ - @javax.annotation.Nullable - public String getMerchantCategoryCode() { - return merchantCategoryCode; - } - - public void setMerchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - } - - - public Form1099KResponse paymentTransactionNumber(Double paymentTransactionNumber) { - this.paymentTransactionNumber = paymentTransactionNumber; - return this; - } - - /** - * Get paymentTransactionNumber - * @return paymentTransactionNumber - */ - @javax.annotation.Nullable - public Double getPaymentTransactionNumber() { - return paymentTransactionNumber; - } - - public void setPaymentTransactionNumber(Double paymentTransactionNumber) { - this.paymentTransactionNumber = paymentTransactionNumber; - } - - - public Form1099KResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Get federalIncomeTaxWithheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099KResponse january(Double january) { - this.january = january; - return this; - } - - /** - * Get january - * @return january - */ - @javax.annotation.Nullable - public Double getJanuary() { - return january; - } - - public void setJanuary(Double january) { - this.january = january; - } - - - public Form1099KResponse february(Double february) { - this.february = february; - return this; - } - - /** - * Get february - * @return february - */ - @javax.annotation.Nullable - public Double getFebruary() { - return february; - } - - public void setFebruary(Double february) { - this.february = february; - } - - - public Form1099KResponse march(Double march) { - this.march = march; - return this; - } - - /** - * Get march - * @return march - */ - @javax.annotation.Nullable - public Double getMarch() { - return march; - } - - public void setMarch(Double march) { - this.march = march; - } - - - public Form1099KResponse april(Double april) { - this.april = april; - return this; - } - - /** - * Get april - * @return april - */ - @javax.annotation.Nullable - public Double getApril() { - return april; - } - - public void setApril(Double april) { - this.april = april; - } - - - public Form1099KResponse may(Double may) { - this.may = may; - return this; - } - - /** - * Get may - * @return may - */ - @javax.annotation.Nullable - public Double getMay() { - return may; - } - - public void setMay(Double may) { - this.may = may; - } - - - public Form1099KResponse june(Double june) { - this.june = june; - return this; - } - - /** - * Get june - * @return june - */ - @javax.annotation.Nullable - public Double getJune() { - return june; - } - - public void setJune(Double june) { - this.june = june; - } - - - public Form1099KResponse july(Double july) { - this.july = july; - return this; - } - - /** - * Get july - * @return july - */ - @javax.annotation.Nullable - public Double getJuly() { - return july; - } - - public void setJuly(Double july) { - this.july = july; - } - - - public Form1099KResponse august(Double august) { - this.august = august; - return this; - } - - /** - * Get august - * @return august - */ - @javax.annotation.Nullable - public Double getAugust() { - return august; - } - - public void setAugust(Double august) { - this.august = august; - } - - - public Form1099KResponse sept(Double sept) { - this.sept = sept; - return this; - } - - /** - * Get sept - * @return sept - */ - @javax.annotation.Nullable - public Double getSept() { - return sept; - } - - public void setSept(Double sept) { - this.sept = sept; - } - - - public Form1099KResponse october(Double october) { - this.october = october; - return this; - } - - /** - * Get october - * @return october - */ - @javax.annotation.Nullable - public Double getOctober() { - return october; - } - - public void setOctober(Double october) { - this.october = october; - } - - - public Form1099KResponse november(Double november) { - this.november = november; - return this; - } - - /** - * Get november - * @return november - */ - @javax.annotation.Nullable - public Double getNovember() { - return november; - } - - public void setNovember(Double november) { - this.november = november; - } - - - public Form1099KResponse december(Double december) { - this.december = december; - return this; - } - - /** - * Get december - * @return december - */ - @javax.annotation.Nullable - public Double getDecember() { - return december; - } - - public void setDecember(Double december) { - this.december = december; - } - - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - - public Form1099KResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Form1099KResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099KResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - public Form1099KResponse tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Get tinType - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099KResponse id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public Form1099KResponse issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Get issuerId - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099KResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Get issuerReferenceId - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099KResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Get issuerTin - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099KResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Get taxYear - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099KResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099KResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get recipientName - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099KResponse recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Get recipientTin - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099KResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Get recipientSecondName - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099KResponse address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099KResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Get address2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099KResponse city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099KResponse state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099KResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099KResponse email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099KResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099KResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Get officeCode - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099KResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Get nonUsProvince - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099KResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099KResponse federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Get federalEFile - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099KResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Get postalMail - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099KResponse stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Get stateEFile - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099KResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Get tinMatch - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099KResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Get noTin - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099KResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Get secondTinNotice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099KResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Get addressVerification - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099KResponse federalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - return this; - } - - /** - * Get federalEfileStatus - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - public void setFederalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - } - - - public Form1099KResponse eDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - return this; - } - - /** - * Get eDeliveryStatus - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - } - - - public Form1099KResponse stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099KResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); - return this; - } - - /** - * Get stateEfileStatus - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - } - - - public Form1099KResponse postalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - return this; - } - - /** - * Get postalMailStatus - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - public void setPostalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - } - - - public Form1099KResponse tinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - return this; - } - - /** - * Get tinMatchStatus - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - public void setTinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - } - - - public Form1099KResponse addressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - return this; - } - - /** - * Get addressVerificationStatus - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - } - - - public Form1099KResponse validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1099KResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } - - /** - * Get validationErrors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099KResponse form1099KResponse = (Form1099KResponse) o; - return Objects.equals(this.filerType, form1099KResponse.filerType) && - Objects.equals(this.paymentType, form1099KResponse.paymentType) && - Objects.equals(this.paymentSettlementEntityNamePhoneNumber, form1099KResponse.paymentSettlementEntityNamePhoneNumber) && - Objects.equals(this.grossAmountPaymentCard, form1099KResponse.grossAmountPaymentCard) && - Objects.equals(this.cardNotPresentTransactions, form1099KResponse.cardNotPresentTransactions) && - Objects.equals(this.merchantCategoryCode, form1099KResponse.merchantCategoryCode) && - Objects.equals(this.paymentTransactionNumber, form1099KResponse.paymentTransactionNumber) && - Objects.equals(this.federalIncomeTaxWithheld, form1099KResponse.federalIncomeTaxWithheld) && - Objects.equals(this.january, form1099KResponse.january) && - Objects.equals(this.february, form1099KResponse.february) && - Objects.equals(this.march, form1099KResponse.march) && - Objects.equals(this.april, form1099KResponse.april) && - Objects.equals(this.may, form1099KResponse.may) && - Objects.equals(this.june, form1099KResponse.june) && - Objects.equals(this.july, form1099KResponse.july) && - Objects.equals(this.august, form1099KResponse.august) && - Objects.equals(this.sept, form1099KResponse.sept) && - Objects.equals(this.october, form1099KResponse.october) && - Objects.equals(this.november, form1099KResponse.november) && - Objects.equals(this.december, form1099KResponse.december) && - Objects.equals(this.type, form1099KResponse.type) && - Objects.equals(this.createdAt, form1099KResponse.createdAt) && - Objects.equals(this.updatedAt, form1099KResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099KResponse.stateAndLocalWithholding) && - Objects.equals(this.tinType, form1099KResponse.tinType) && - Objects.equals(this.id, form1099KResponse.id) && - Objects.equals(this.issuerId, form1099KResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099KResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099KResponse.issuerTin) && - Objects.equals(this.taxYear, form1099KResponse.taxYear) && - Objects.equals(this.referenceId, form1099KResponse.referenceId) && - Objects.equals(this.recipientName, form1099KResponse.recipientName) && - Objects.equals(this.recipientTin, form1099KResponse.recipientTin) && - Objects.equals(this.recipientSecondName, form1099KResponse.recipientSecondName) && - Objects.equals(this.address, form1099KResponse.address) && - Objects.equals(this.address2, form1099KResponse.address2) && - Objects.equals(this.city, form1099KResponse.city) && - Objects.equals(this.state, form1099KResponse.state) && - Objects.equals(this.zip, form1099KResponse.zip) && - Objects.equals(this.email, form1099KResponse.email) && - Objects.equals(this.accountNumber, form1099KResponse.accountNumber) && - Objects.equals(this.officeCode, form1099KResponse.officeCode) && - Objects.equals(this.nonUsProvince, form1099KResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099KResponse.countryCode) && - Objects.equals(this.federalEFile, form1099KResponse.federalEFile) && - Objects.equals(this.postalMail, form1099KResponse.postalMail) && - Objects.equals(this.stateEFile, form1099KResponse.stateEFile) && - Objects.equals(this.tinMatch, form1099KResponse.tinMatch) && - Objects.equals(this.noTin, form1099KResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099KResponse.secondTinNotice) && - Objects.equals(this.addressVerification, form1099KResponse.addressVerification) && - Objects.equals(this.federalEfileStatus, form1099KResponse.federalEfileStatus) && - Objects.equals(this.eDeliveryStatus, form1099KResponse.eDeliveryStatus) && - Objects.equals(this.stateEfileStatus, form1099KResponse.stateEfileStatus) && - Objects.equals(this.postalMailStatus, form1099KResponse.postalMailStatus) && - Objects.equals(this.tinMatchStatus, form1099KResponse.tinMatchStatus) && - Objects.equals(this.addressVerificationStatus, form1099KResponse.addressVerificationStatus) && - Objects.equals(this.validationErrors, form1099KResponse.validationErrors); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, sept, october, november, december, type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099KResponse {\n"); - sb.append(" filerType: ").append(toIndentedString(filerType)).append("\n"); - sb.append(" paymentType: ").append(toIndentedString(paymentType)).append("\n"); - sb.append(" paymentSettlementEntityNamePhoneNumber: ").append(toIndentedString(paymentSettlementEntityNamePhoneNumber)).append("\n"); - sb.append(" grossAmountPaymentCard: ").append(toIndentedString(grossAmountPaymentCard)).append("\n"); - sb.append(" cardNotPresentTransactions: ").append(toIndentedString(cardNotPresentTransactions)).append("\n"); - sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); - sb.append(" paymentTransactionNumber: ").append(toIndentedString(paymentTransactionNumber)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" january: ").append(toIndentedString(january)).append("\n"); - sb.append(" february: ").append(toIndentedString(february)).append("\n"); - sb.append(" march: ").append(toIndentedString(march)).append("\n"); - sb.append(" april: ").append(toIndentedString(april)).append("\n"); - sb.append(" may: ").append(toIndentedString(may)).append("\n"); - sb.append(" june: ").append(toIndentedString(june)).append("\n"); - sb.append(" july: ").append(toIndentedString(july)).append("\n"); - sb.append(" august: ").append(toIndentedString(august)).append("\n"); - sb.append(" sept: ").append(toIndentedString(sept)).append("\n"); - sb.append(" october: ").append(toIndentedString(october)).append("\n"); - sb.append(" november: ").append(toIndentedString(november)).append("\n"); - sb.append(" december: ").append(toIndentedString(december)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("tinType"); - openapiFields.add("id"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("referenceId"); - openapiFields.add("recipientName"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("addressVerification"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("validationErrors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099KResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099KResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099KResponse is not found in the empty JSON string", Form1099KResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099KResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099KResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) && !jsonObj.get("filerType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `filerType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("filerType").toString())); - } - // validate the optional field `filerType` - if (jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) { - FilerTypeEnum.validateJsonElement(jsonObj.get("filerType")); - } - if ((jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) && !jsonObj.get("paymentType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentType").toString())); - } - // validate the optional field `paymentType` - if (jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) { - PaymentTypeEnum.validateJsonElement(jsonObj.get("paymentType")); - } - if ((jsonObj.get("paymentSettlementEntityNamePhoneNumber") != null && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonNull()) && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `paymentSettlementEntityNamePhoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentSettlementEntityNamePhoneNumber").toString())); - } - if ((jsonObj.get("merchantCategoryCode") != null && !jsonObj.get("merchantCategoryCode").isJsonNull()) && !jsonObj.get("merchantCategoryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `merchantCategoryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("merchantCategoryCode").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099KResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099KResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099KResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099KResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099KResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099KResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099KResponse - * @throws IOException if the JSON string is invalid with respect to Form1099KResponse - */ - public static Form1099KResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099KResponse.class); - } - - /** - * Convert an instance of Form1099KResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099List.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099List.java deleted file mode 100644 index eee8d63..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099List.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Get1099Form200Response; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099List - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099List { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data; - - public Form1099List() { - } - - public Form1099List data(List data) { - this.data = data; - return this; - } - - public Form1099List addDataItem(Get1099Form200Response dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - */ - @javax.annotation.Nullable - public List getData() { - return data; - } - - public void setData(List data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099List form1099List = (Form1099List) o; - return Objects.equals(this.data, form1099List.data); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099List {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099List - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099List.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099List is not found in the empty JSON string", Form1099List.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099List.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099List` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Get1099Form200Response.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099List.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099List' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099List.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099List value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099List read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099List given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099List - * @throws IOException if the JSON string is invalid with respect to Form1099List - */ - public static Form1099List fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099List.class); - } - - /** - * Convert an instance of Form1099List to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListDataInner.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListDataInner.java deleted file mode 100644 index 45f3a79..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListDataInner.java +++ /dev/null @@ -1,376 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1099K; -import Avalara.SDK.model.A1099.V2.Form1099Misc; -import Avalara.SDK.model.A1099.V2.Form1099Nec; -import Avalara.SDK.model.A1099.V2.Form1099R; -import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationError; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import Avalara.SDK.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099ListDataInner extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(Form1099ListDataInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099ListDataInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099ListDataInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterForm1099K = gson.getDelegateAdapter(this, TypeToken.get(Form1099K.class)); - final TypeAdapter adapterForm1099Misc = gson.getDelegateAdapter(this, TypeToken.get(Form1099Misc.class)); - final TypeAdapter adapterForm1099Nec = gson.getDelegateAdapter(this, TypeToken.get(Form1099Nec.class)); - final TypeAdapter adapterForm1099R = gson.getDelegateAdapter(this, TypeToken.get(Form1099R.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099ListDataInner value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Form1099K` - if (value.getActualInstance() instanceof Form1099K) { - JsonElement element = adapterForm1099K.toJsonTree((Form1099K)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099Misc` - if (value.getActualInstance() instanceof Form1099Misc) { - JsonElement element = adapterForm1099Misc.toJsonTree((Form1099Misc)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099Nec` - if (value.getActualInstance() instanceof Form1099Nec) { - JsonElement element = adapterForm1099Nec.toJsonTree((Form1099Nec)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099R` - if (value.getActualInstance() instanceof Form1099R) { - JsonElement element = adapterForm1099R.toJsonTree((Form1099R)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1099K, Form1099Misc, Form1099Nec, Form1099R"); - } - - @Override - public Form1099ListDataInner read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Form1099K - try { - // validate the JSON object to see if any exception is thrown - Form1099K.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099K; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099K'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099K failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099K'", e); - } - // deserialize Form1099Misc - try { - // validate the JSON object to see if any exception is thrown - Form1099Misc.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099Misc; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099Misc'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099Misc failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099Misc'", e); - } - // deserialize Form1099Nec - try { - // validate the JSON object to see if any exception is thrown - Form1099Nec.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099Nec; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099Nec'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099Nec failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099Nec'", e); - } - // deserialize Form1099R - try { - // validate the JSON object to see if any exception is thrown - Form1099R.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099R; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099R'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099R failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099R'", e); - } - - if (match == 1) { - Form1099ListDataInner ret = new Form1099ListDataInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for Form1099ListDataInner: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public Form1099ListDataInner() { - super("oneOf", Boolean.FALSE); - } - - public Form1099ListDataInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Form1099K", Form1099K.class); - schemas.put("Form1099Misc", Form1099Misc.class); - schemas.put("Form1099Nec", Form1099Nec.class); - schemas.put("Form1099R", Form1099R.class); - } - - @Override - public Map> getSchemas() { - return Form1099ListDataInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * Form1099K, Form1099Misc, Form1099Nec, Form1099R - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Form1099K) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099Misc) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099Nec) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099R) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Form1099K, Form1099Misc, Form1099Nec, Form1099R"); - } - - /** - * Get the actual instance, which can be the following: - * Form1099K, Form1099Misc, Form1099Nec, Form1099R - * - * @return The actual instance (Form1099K, Form1099Misc, Form1099Nec, Form1099R) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Form1099K`. If the actual instance is not `Form1099K`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099K` - * @throws ClassCastException if the instance is not `Form1099K` - */ - public Form1099K getForm1099K() throws ClassCastException { - return (Form1099K)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099Misc`. If the actual instance is not `Form1099Misc`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099Misc` - * @throws ClassCastException if the instance is not `Form1099Misc` - */ - public Form1099Misc getForm1099Misc() throws ClassCastException { - return (Form1099Misc)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099Nec`. If the actual instance is not `Form1099Nec`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099Nec` - * @throws ClassCastException if the instance is not `Form1099Nec` - */ - public Form1099Nec getForm1099Nec() throws ClassCastException { - return (Form1099Nec)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099R`. If the actual instance is not `Form1099R`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099R` - * @throws ClassCastException if the instance is not `Form1099R` - */ - public Form1099R getForm1099R() throws ClassCastException { - return (Form1099R)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099ListDataInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Form1099K - try { - Form1099K.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099K failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099Misc - try { - Form1099Misc.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099Misc failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099Nec - try { - Form1099Nec.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099Nec failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099R - try { - Form1099R.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099R failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Form1099ListDataInner with oneOf schemas: Form1099K, Form1099Misc, Form1099Nec, Form1099R. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of Form1099ListDataInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099ListDataInner - * @throws IOException if the JSON string is invalid with respect to Form1099ListDataInner - */ - public static Form1099ListDataInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099ListDataInner.class); - } - - /** - * Convert an instance of Form1099ListDataInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java similarity index 58% rename from src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntList.java rename to src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java index f2cd9a5..3d4fe55 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099IntList.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java @@ -20,7 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1099IntListItem; +import Avalara.SDK.model.A1099.V2.Get1099Form200Response; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -56,27 +56,112 @@ import Avalara.SDK.JSON; /** - * Form1099IntList + * Form1099ListRequest */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099IntList { +public class Form1099ListRequest { + /** + * Gets or Sets type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1099_NEC("1099-NEC"), + + _1099_MISC("1099-MISC"), + + _1099_DIV("1099-DIV"), + + _1099_R("1099-R"), + + _1099_K("1099-K"), + + _1095_B("1095-B"), + + _1042_S("1042-S"), + + _1095_C("1095-C"), + + _1099_INT("1099-INT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + public static final String SERIALIZED_NAME_FORMS = "forms"; @SerializedName(SERIALIZED_NAME_FORMS) - private List forms; + private List forms; + + public Form1099ListRequest() { + } + + public Form1099ListRequest type(TypeEnum type) { + this.type = type; + return this; + } - public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; - @SerializedName(SERIALIZED_NAME_FORM_TYPE) - private String formType; + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } - public Form1099IntList() { + public void setType(TypeEnum type) { + this.type = type; } - public Form1099IntList forms(List forms) { + + public Form1099ListRequest forms(List forms) { this.forms = forms; return this; } - public Form1099IntList addFormsItem(Form1099IntListItem formsItem) { + public Form1099ListRequest addFormsItem(Get1099Form200Response formsItem) { if (this.forms == null) { this.forms = new ArrayList<>(); } @@ -89,34 +174,15 @@ public Form1099IntList addFormsItem(Form1099IntListItem formsItem) { * @return forms */ @javax.annotation.Nullable - public List getForms() { + public List getForms() { return forms; } - public void setForms(List forms) { + public void setForms(List forms) { this.forms = forms; } - public Form1099IntList formType(String formType) { - this.formType = formType; - return this; - } - - /** - * Get formType - * @return formType - */ - @javax.annotation.Nullable - public String getFormType() { - return formType; - } - - public void setFormType(String formType) { - this.formType = formType; - } - - @Override public boolean equals(Object o) { @@ -126,22 +192,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Form1099IntList form1099IntList = (Form1099IntList) o; - return Objects.equals(this.forms, form1099IntList.forms) && - Objects.equals(this.formType, form1099IntList.formType); + Form1099ListRequest form1099ListRequest = (Form1099ListRequest) o; + return Objects.equals(this.type, form1099ListRequest.type) && + Objects.equals(this.forms, form1099ListRequest.forms); } @Override public int hashCode() { - return Objects.hash(forms, formType); + return Objects.hash(type, forms); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Form1099IntList {\n"); + sb.append("class Form1099ListRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" forms: ").append(toIndentedString(forms)).append("\n"); - sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -164,7 +230,8 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("formType"); + openapiFields.add("type"); + openapiFields.add("forms"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -174,23 +241,30 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099IntList + * @throws IOException if the JSON Element is invalid with respect to Form1099ListRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!Form1099IntList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099IntList is not found in the empty JSON string", Form1099IntList.openapiRequiredFields.toString())); + if (!Form1099ListRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099ListRequest is not found in the empty JSON string", Form1099ListRequest.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!Form1099IntList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099IntList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!Form1099ListRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099ListRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } if (jsonObj.get("forms") != null && !jsonObj.get("forms").isJsonNull()) { JsonArray jsonArrayforms = jsonObj.getAsJsonArray("forms"); if (jsonArrayforms != null) { @@ -201,35 +275,32 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `forms` (array) for (int i = 0; i < jsonArrayforms.size(); i++) { - Form1099IntListItem.validateJsonElement(jsonArrayforms.get(i)); + Get1099Form200Response.validateJsonElement(jsonArrayforms.get(i)); }; } } - if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099IntList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099IntList' and its subtypes + if (!Form1099ListRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099ListRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntList.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099ListRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Form1099IntList value) throws IOException { + public void write(JsonWriter out, Form1099ListRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public Form1099IntList read(JsonReader in) throws IOException { + public Form1099ListRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -240,18 +311,18 @@ public Form1099IntList read(JsonReader in) throws IOException { } /** - * Create an instance of Form1099IntList given an JSON string + * Create an instance of Form1099ListRequest given an JSON string * * @param jsonString JSON string - * @return An instance of Form1099IntList - * @throws IOException if the JSON string is invalid with respect to Form1099IntList + * @return An instance of Form1099ListRequest + * @throws IOException if the JSON string is invalid with respect to Form1099ListRequest */ - public static Form1099IntList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099IntList.class); + public static Form1099ListRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099ListRequest.class); } /** - * Convert an instance of Form1099IntList to an JSON string + * Convert an instance of Form1099ListRequest to an JSON string * * @return JSON string */ diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponse.java deleted file mode 100644 index 5a3651a..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponse.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1099ListResponseValueInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099ListResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099ListResponse { - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private List value; - - public Form1099ListResponse() { - } - - public Form1099ListResponse value(List value) { - this.value = value; - return this; - } - - public Form1099ListResponse addValueItem(Form1099ListResponseValueInner valueItem) { - if (this.value == null) { - this.value = new ArrayList<>(); - } - this.value.add(valueItem); - return this; - } - - /** - * List of Form 1099 responses - * @return value - */ - @javax.annotation.Nullable - public List getValue() { - return value; - } - - public void setValue(List value) { - this.value = value; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099ListResponse form1099ListResponse = (Form1099ListResponse) o; - return Objects.equals(this.value, form1099ListResponse.value); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099ListResponse {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099ListResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099ListResponse is not found in the empty JSON string", Form1099ListResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099ListResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099ListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) { - JsonArray jsonArrayvalue = jsonObj.getAsJsonArray("value"); - if (jsonArrayvalue != null) { - // ensure the json data is an array - if (!jsonObj.get("value").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be an array in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - - // validate the optional field `value` (array) - for (int i = 0; i < jsonArrayvalue.size(); i++) { - Form1099ListResponseValueInner.validateJsonElement(jsonArrayvalue.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099ListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099ListResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099ListResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099ListResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099ListResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099ListResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099ListResponse - * @throws IOException if the JSON string is invalid with respect to Form1099ListResponse - */ - public static Form1099ListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099ListResponse.class); - } - - /** - * Convert an instance of Form1099ListResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponseValueInner.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponseValueInner.java deleted file mode 100644 index 7d3535c..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponseValueInner.java +++ /dev/null @@ -1,599 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualReferenceResponse; -import Avalara.SDK.model.A1099.V2.Form1042SListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1095BListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099BaseResponse; -import Avalara.SDK.model.A1099.V2.Form1099DivListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099IntListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099KListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099RListItemResponse; -import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughResponse; -import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentResponse; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import Avalara.SDK.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099ListResponseValueInner extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(Form1099ListResponseValueInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099ListResponseValueInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099ListResponseValueInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterForm1099BaseResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099BaseResponse.class)); - final TypeAdapter adapterForm1042SListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItemResponse.class)); - final TypeAdapter adapterForm1095BListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItemResponse.class)); - final TypeAdapter adapterForm1099DivListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivListItemResponse.class)); - final TypeAdapter adapterForm1099IntListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntListItemResponse.class)); - final TypeAdapter adapterForm1099KListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099KListItemResponse.class)); - final TypeAdapter adapterForm1099MiscListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscListItemResponse.class)); - final TypeAdapter adapterForm1099NecListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecListItemResponse.class)); - final TypeAdapter adapterForm1099RListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099RListItemResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099ListResponseValueInner value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Form1099BaseResponse` - if (value.getActualInstance() instanceof Form1099BaseResponse) { - JsonElement element = adapterForm1099BaseResponse.toJsonTree((Form1099BaseResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1042SListItemResponse` - if (value.getActualInstance() instanceof Form1042SListItemResponse) { - JsonElement element = adapterForm1042SListItemResponse.toJsonTree((Form1042SListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1095BListItemResponse` - if (value.getActualInstance() instanceof Form1095BListItemResponse) { - JsonElement element = adapterForm1095BListItemResponse.toJsonTree((Form1095BListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099DivListItemResponse` - if (value.getActualInstance() instanceof Form1099DivListItemResponse) { - JsonElement element = adapterForm1099DivListItemResponse.toJsonTree((Form1099DivListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099IntListItemResponse` - if (value.getActualInstance() instanceof Form1099IntListItemResponse) { - JsonElement element = adapterForm1099IntListItemResponse.toJsonTree((Form1099IntListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099KListItemResponse` - if (value.getActualInstance() instanceof Form1099KListItemResponse) { - JsonElement element = adapterForm1099KListItemResponse.toJsonTree((Form1099KListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099MiscListItemResponse` - if (value.getActualInstance() instanceof Form1099MiscListItemResponse) { - JsonElement element = adapterForm1099MiscListItemResponse.toJsonTree((Form1099MiscListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099NecListItemResponse` - if (value.getActualInstance() instanceof Form1099NecListItemResponse) { - JsonElement element = adapterForm1099NecListItemResponse.toJsonTree((Form1099NecListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099RListItemResponse` - if (value.getActualInstance() instanceof Form1099RListItemResponse) { - JsonElement element = adapterForm1099RListItemResponse.toJsonTree((Form1099RListItemResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); - } - - @Override - public Form1099ListResponseValueInner read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Form1099BaseResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099BaseResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099BaseResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099BaseResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099BaseResponse'", e); - } - // deserialize Form1042SListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1042SListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1042SListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1042SListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1042SListItemResponse'", e); - } - // deserialize Form1095BListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1095BListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1095BListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1095BListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1095BListItemResponse'", e); - } - // deserialize Form1099DivListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099DivListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099DivListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099DivListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099DivListItemResponse'", e); - } - // deserialize Form1099IntListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099IntListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099IntListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099IntListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099IntListItemResponse'", e); - } - // deserialize Form1099KListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099KListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099KListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099KListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099KListItemResponse'", e); - } - // deserialize Form1099MiscListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099MiscListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099MiscListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099MiscListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099MiscListItemResponse'", e); - } - // deserialize Form1099NecListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099NecListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099NecListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099NecListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099NecListItemResponse'", e); - } - // deserialize Form1099RListItemResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099RListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099RListItemResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099RListItemResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099RListItemResponse'", e); - } - - if (match == 1) { - Form1099ListResponseValueInner ret = new Form1099ListResponseValueInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for Form1099ListResponseValueInner: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public Form1099ListResponseValueInner() { - super("oneOf", Boolean.FALSE); - } - - public Form1099ListResponseValueInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Form1099BaseResponse", Form1099BaseResponse.class); - schemas.put("Form1042SListItemResponse", Form1042SListItemResponse.class); - schemas.put("Form1095BListItemResponse", Form1095BListItemResponse.class); - schemas.put("Form1099DivListItemResponse", Form1099DivListItemResponse.class); - schemas.put("Form1099IntListItemResponse", Form1099IntListItemResponse.class); - schemas.put("Form1099KListItemResponse", Form1099KListItemResponse.class); - schemas.put("Form1099MiscListItemResponse", Form1099MiscListItemResponse.class); - schemas.put("Form1099NecListItemResponse", Form1099NecListItemResponse.class); - schemas.put("Form1099RListItemResponse", Form1099RListItemResponse.class); - } - - @Override - public Map> getSchemas() { - return Form1099ListResponseValueInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Form1099BaseResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1042SListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1095BListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099DivListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099IntListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099KListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099MiscListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099NecListItemResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099RListItemResponse) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); - } - - /** - * Get the actual instance, which can be the following: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse - * - * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Form1099BaseResponse`. If the actual instance is not `Form1099BaseResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099BaseResponse` - * @throws ClassCastException if the instance is not `Form1099BaseResponse` - */ - public Form1099BaseResponse getForm1099BaseResponse() throws ClassCastException { - return (Form1099BaseResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1042SListItemResponse`. If the actual instance is not `Form1042SListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1042SListItemResponse` - * @throws ClassCastException if the instance is not `Form1042SListItemResponse` - */ - public Form1042SListItemResponse getForm1042SListItemResponse() throws ClassCastException { - return (Form1042SListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1095BListItemResponse`. If the actual instance is not `Form1095BListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1095BListItemResponse` - * @throws ClassCastException if the instance is not `Form1095BListItemResponse` - */ - public Form1095BListItemResponse getForm1095BListItemResponse() throws ClassCastException { - return (Form1095BListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099DivListItemResponse`. If the actual instance is not `Form1099DivListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099DivListItemResponse` - * @throws ClassCastException if the instance is not `Form1099DivListItemResponse` - */ - public Form1099DivListItemResponse getForm1099DivListItemResponse() throws ClassCastException { - return (Form1099DivListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099IntListItemResponse`. If the actual instance is not `Form1099IntListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099IntListItemResponse` - * @throws ClassCastException if the instance is not `Form1099IntListItemResponse` - */ - public Form1099IntListItemResponse getForm1099IntListItemResponse() throws ClassCastException { - return (Form1099IntListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099KListItemResponse`. If the actual instance is not `Form1099KListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099KListItemResponse` - * @throws ClassCastException if the instance is not `Form1099KListItemResponse` - */ - public Form1099KListItemResponse getForm1099KListItemResponse() throws ClassCastException { - return (Form1099KListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099MiscListItemResponse`. If the actual instance is not `Form1099MiscListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099MiscListItemResponse` - * @throws ClassCastException if the instance is not `Form1099MiscListItemResponse` - */ - public Form1099MiscListItemResponse getForm1099MiscListItemResponse() throws ClassCastException { - return (Form1099MiscListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099NecListItemResponse`. If the actual instance is not `Form1099NecListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099NecListItemResponse` - * @throws ClassCastException if the instance is not `Form1099NecListItemResponse` - */ - public Form1099NecListItemResponse getForm1099NecListItemResponse() throws ClassCastException { - return (Form1099NecListItemResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099RListItemResponse`. If the actual instance is not `Form1099RListItemResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099RListItemResponse` - * @throws ClassCastException if the instance is not `Form1099RListItemResponse` - */ - public Form1099RListItemResponse getForm1099RListItemResponse() throws ClassCastException { - return (Form1099RListItemResponse)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099ListResponseValueInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Form1099BaseResponse - try { - Form1099BaseResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1042SListItemResponse - try { - Form1042SListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1095BListItemResponse - try { - Form1095BListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099DivListItemResponse - try { - Form1099DivListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099IntListItemResponse - try { - Form1099IntListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099KListItemResponse - try { - Form1099KListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099MiscListItemResponse - try { - Form1099MiscListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099NecListItemResponse - try { - Form1099NecListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099RListItemResponse - try { - Form1099RListItemResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Form1099ListResponseValueInner with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of Form1099ListResponseValueInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099ListResponseValueInner - * @throws IOException if the JSON string is invalid with respect to Form1099ListResponseValueInner - */ - public static Form1099ListResponseValueInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099ListResponseValueInner.class); - } - - /** - * Convert an instance of Form1099ListResponseValueInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java index 4e541bb..7f0d42a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java @@ -30,6 +30,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -61,7 +62,7 @@ import Avalara.SDK.JSON; /** - * Form1099Misc + * Form 1099-MISC: Miscellaneous Income */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1099Misc { @@ -77,9 +78,9 @@ public class Form1099Misc { @SerializedName(SERIALIZED_NAME_OTHER_INCOME) private Double otherIncome; - public static final String SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD = "fedIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD) - private Double fedIncomeTaxWithheld; + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; public static final String SERIALIZED_NAME_FISHING_BOAT_PROCEEDS = "fishingBoatProceeds"; @SerializedName(SERIALIZED_NAME_FISHING_BOAT_PROCEEDS) @@ -89,22 +90,18 @@ public class Form1099Misc { @SerializedName(SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE_PAYMENTS) private Double medicalAndHealthCarePayments; - public static final String SERIALIZED_NAME_SUBSTITUTE_PAYMENTS = "substitutePayments"; - @SerializedName(SERIALIZED_NAME_SUBSTITUTE_PAYMENTS) - private Double substitutePayments; - public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) private Boolean directSalesIndicator; + public static final String SERIALIZED_NAME_SUBSTITUTE_PAYMENTS = "substitutePayments"; + @SerializedName(SERIALIZED_NAME_SUBSTITUTE_PAYMENTS) + private Double substitutePayments; + public static final String SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS = "cropInsuranceProceeds"; @SerializedName(SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS) private Double cropInsuranceProceeds; - public static final String SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS = "excessGoldenParachutePayments"; - @SerializedName(SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS) - private Double excessGoldenParachutePayments; - public static final String SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY = "grossProceedsPaidToAttorney"; @SerializedName(SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY) private Double grossProceedsPaidToAttorney; @@ -117,21 +114,95 @@ public class Form1099Misc { @SerializedName(SERIALIZED_NAME_SECTION409_A_DEFERRALS) private Double section409ADeferrals; + public static final String SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS = "excessGoldenParachutePayments"; + @SerializedName(SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS) + private Double excessGoldenParachutePayments; + public static final String SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION = "nonqualifiedDeferredCompensation"; @SerializedName(SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION) private Double nonqualifiedDeferredCompensation; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; + public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; + @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) + private Boolean fatcaFilingRequirement; + + /** + * Form type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1099_NEC("1099-NEC"), + + _1099_MISC("1099-MISC"), + + _1099_DIV("1099-DIV"), + + _1099_R("1099-R"), + + _1099_K("1099-K"), + + _1095_B("1095-B"), + + _1042_S("1042-S"), + + _1095_C("1095-C"), + + _1099_INT("1099-INT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private String type; + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; + private String issuerId; public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) @@ -145,81 +216,79 @@ public class Form1099Misc { @SerializedName(SERIALIZED_NAME_TAX_YEAR) private Integer taxYear; - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private Form1099StatusDetail postalMailStatus; + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; + /** + * Type of TIN (Tax ID Number) + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EMPTY("Empty"), + + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"); + + private String value; + + TinTypeEnum(String value) { + this.value = value; + } - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private Form1099StatusDetail tinMatchStatus; + public String getValue() { + return value; + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; + @Override + public String toString() { + return String.valueOf(value); + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private Form1099StatusDetail addressVerificationStatus; + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private Form1099StatusDetail eDeliveryStatus; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; + private TinTypeEnum tinType; public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) @@ -245,6 +314,18 @@ public class Form1099Misc { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -253,13 +334,65 @@ public class Form1099Misc { @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) private String countryCode; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) @@ -273,20 +406,41 @@ public class Form1099Misc { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholding stateAndLocalWithholding; - public Form1099Misc() { } + public Form1099Misc( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + public Form1099Misc rents(Double rents) { this.rents = rents; return this; } /** - * Get rents + * Rents * @return rents */ @javax.annotation.Nullable @@ -305,7 +459,7 @@ public Form1099Misc royalties(Double royalties) { } /** - * Get royalties + * Royalties * @return royalties */ @javax.annotation.Nullable @@ -324,7 +478,7 @@ public Form1099Misc otherIncome(Double otherIncome) { } /** - * Get otherIncome + * Other income * @return otherIncome */ @javax.annotation.Nullable @@ -337,22 +491,22 @@ public void setOtherIncome(Double otherIncome) { } - public Form1099Misc fedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; + public Form1099Misc federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; return this; } /** - * Get fedIncomeTaxWithheld - * @return fedIncomeTaxWithheld + * Federal income tax withheld + * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable - public Double getFedIncomeTaxWithheld() { - return fedIncomeTaxWithheld; + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; } - public void setFedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; } @@ -362,7 +516,7 @@ public Form1099Misc fishingBoatProceeds(Double fishingBoatProceeds) { } /** - * Get fishingBoatProceeds + * Fishing boat proceeds * @return fishingBoatProceeds */ @javax.annotation.Nullable @@ -381,7 +535,7 @@ public Form1099Misc medicalAndHealthCarePayments(Double medicalAndHealthCarePaym } /** - * Get medicalAndHealthCarePayments + * Medical and health care payments * @return medicalAndHealthCarePayments */ @javax.annotation.Nullable @@ -394,32 +548,13 @@ public void setMedicalAndHealthCarePayments(Double medicalAndHealthCarePayments) } - public Form1099Misc substitutePayments(Double substitutePayments) { - this.substitutePayments = substitutePayments; - return this; - } - - /** - * Get substitutePayments - * @return substitutePayments - */ - @javax.annotation.Nullable - public Double getSubstitutePayments() { - return substitutePayments; - } - - public void setSubstitutePayments(Double substitutePayments) { - this.substitutePayments = substitutePayments; - } - - public Form1099Misc directSalesIndicator(Boolean directSalesIndicator) { this.directSalesIndicator = directSalesIndicator; return this; } /** - * Get directSalesIndicator + * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale * @return directSalesIndicator */ @javax.annotation.Nullable @@ -432,41 +567,41 @@ public void setDirectSalesIndicator(Boolean directSalesIndicator) { } - public Form1099Misc cropInsuranceProceeds(Double cropInsuranceProceeds) { - this.cropInsuranceProceeds = cropInsuranceProceeds; + public Form1099Misc substitutePayments(Double substitutePayments) { + this.substitutePayments = substitutePayments; return this; } /** - * Get cropInsuranceProceeds - * @return cropInsuranceProceeds + * Substitute payments in lieu of dividends or interest + * @return substitutePayments */ @javax.annotation.Nullable - public Double getCropInsuranceProceeds() { - return cropInsuranceProceeds; + public Double getSubstitutePayments() { + return substitutePayments; } - public void setCropInsuranceProceeds(Double cropInsuranceProceeds) { - this.cropInsuranceProceeds = cropInsuranceProceeds; + public void setSubstitutePayments(Double substitutePayments) { + this.substitutePayments = substitutePayments; } - public Form1099Misc excessGoldenParachutePayments(Double excessGoldenParachutePayments) { - this.excessGoldenParachutePayments = excessGoldenParachutePayments; + public Form1099Misc cropInsuranceProceeds(Double cropInsuranceProceeds) { + this.cropInsuranceProceeds = cropInsuranceProceeds; return this; } /** - * Get excessGoldenParachutePayments - * @return excessGoldenParachutePayments + * Crop insurance proceeds + * @return cropInsuranceProceeds */ @javax.annotation.Nullable - public Double getExcessGoldenParachutePayments() { - return excessGoldenParachutePayments; + public Double getCropInsuranceProceeds() { + return cropInsuranceProceeds; } - public void setExcessGoldenParachutePayments(Double excessGoldenParachutePayments) { - this.excessGoldenParachutePayments = excessGoldenParachutePayments; + public void setCropInsuranceProceeds(Double cropInsuranceProceeds) { + this.cropInsuranceProceeds = cropInsuranceProceeds; } @@ -476,7 +611,7 @@ public Form1099Misc grossProceedsPaidToAttorney(Double grossProceedsPaidToAttorn } /** - * Get grossProceedsPaidToAttorney + * Gross proceeds paid to an attorney * @return grossProceedsPaidToAttorney */ @javax.annotation.Nullable @@ -495,7 +630,7 @@ public Form1099Misc fishPurchasedForResale(Double fishPurchasedForResale) { } /** - * Get fishPurchasedForResale + * Fish purchased for resale * @return fishPurchasedForResale */ @javax.annotation.Nullable @@ -514,7 +649,7 @@ public Form1099Misc section409ADeferrals(Double section409ADeferrals) { } /** - * Get section409ADeferrals + * Section 409A deferrals * @return section409ADeferrals */ @javax.annotation.Nullable @@ -527,13 +662,32 @@ public void setSection409ADeferrals(Double section409ADeferrals) { } - public Form1099Misc nonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { + public Form1099Misc excessGoldenParachutePayments(Double excessGoldenParachutePayments) { + this.excessGoldenParachutePayments = excessGoldenParachutePayments; + return this; + } + + /** + * (Legacy field) Excess golden parachute payments + * @return excessGoldenParachutePayments + */ + @javax.annotation.Nullable + public Double getExcessGoldenParachutePayments() { + return excessGoldenParachutePayments; + } + + public void setExcessGoldenParachutePayments(Double excessGoldenParachutePayments) { + this.excessGoldenParachutePayments = excessGoldenParachutePayments; + } + + + public Form1099Misc nonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { this.nonqualifiedDeferredCompensation = nonqualifiedDeferredCompensation; return this; } /** - * Get nonqualifiedDeferredCompensation + * Nonqualified deferred compensation * @return nonqualifiedDeferredCompensation */ @javax.annotation.Nullable @@ -546,59 +700,70 @@ public void setNonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompe } - public Form1099Misc id(String id) { - this.id = id; + public Form1099Misc fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; return this; } /** - * Get id - * @return id + * FATCA filing requirement + * @return fatcaFilingRequirement */ @javax.annotation.Nullable - public String getId() { - return id; + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; } - public void setId(String id) { - this.id = id; + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; } - public Form1099Misc type(String type) { + public Form1099Misc type(TypeEnum type) { this.type = type; return this; } /** - * Get type + * Form type * @return type */ - @javax.annotation.Nullable - public String getType() { + @javax.annotation.Nonnull + public TypeEnum getType() { return type; } - public void setType(String type) { + public void setType(TypeEnum type) { this.type = type; } - public Form1099Misc issuerId(Integer issuerId) { + /** + * Form ID. Unique identifier set when the record is created. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + + public Form1099Misc issuerId(String issuerId) { this.issuerId = issuerId; return this; } /** - * Get issuerId + * Issuer ID - only required when creating forms * @return issuerId */ @javax.annotation.Nullable - public Integer getIssuerId() { + public String getIssuerId() { return issuerId; } - public void setIssuerId(Integer issuerId) { + public void setIssuerId(String issuerId) { this.issuerId = issuerId; } @@ -609,7 +774,7 @@ public Form1099Misc issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID - only required when creating forms * @return issuerReferenceId */ @javax.annotation.Nullable @@ -628,7 +793,7 @@ public Form1099Misc issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN - readonly * @return issuerTin */ @javax.annotation.Nullable @@ -647,7 +812,7 @@ public Form1099Misc taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax Year - only required when creating forms * @return taxYear */ @javax.annotation.Nullable @@ -660,580 +825,530 @@ public void setTaxYear(Integer taxYear) { } - public Form1099Misc federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; + public Form1099Misc referenceId(String referenceId) { + this.referenceId = referenceId; return this; } /** - * Get federalEfile - * @return federalEfile + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId */ @javax.annotation.Nullable - public Boolean getFederalEfile() { - return federalEfile; + public String getReferenceId() { + return referenceId; } - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; } - public Form1099Misc federalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public Form1099Misc tin(String tin) { + this.tin = tin; return this; } /** - * Get federalEfileStatus - * @return federalEfileStatus + * Recipient's Federal Tax Identification Number (TIN). + * @return tin */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { - return federalEfileStatus; + public String getTin() { + return tin; } - public void setFederalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public void setTin(String tin) { + this.tin = tin; } - public Form1099Misc stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public Form1099Misc recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get stateEfile - * @return stateEfile + * Recipient name + * @return recipientName */ @javax.annotation.Nullable - public Boolean getStateEfile() { - return stateEfile; + public String getRecipientName() { + return recipientName; } - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } - public Form1099Misc stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099Misc addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); + public Form1099Misc tinType(TinTypeEnum tinType) { + this.tinType = tinType; return this; } /** - * Get stateEfileStatus - * @return stateEfileStatus + * Type of TIN (Tax ID Number) + * @return tinType */ @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; + public TinTypeEnum getTinType() { + return tinType; } - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; } - public Form1099Misc postalMail(Boolean postalMail) { - this.postalMail = postalMail; + public Form1099Misc recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; return this; } /** - * Get postalMail - * @return postalMail + * Recipient second name + * @return recipientSecondName */ @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; + public String getRecipientSecondName() { + return recipientSecondName; } - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; } - public Form1099Misc postalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public Form1099Misc address(String address) { + this.address = address; return this; } /** - * Get postalMailStatus - * @return postalMailStatus + * Address. + * @return address */ @javax.annotation.Nullable - public Form1099StatusDetail getPostalMailStatus() { - return postalMailStatus; + public String getAddress() { + return address; } - public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public void setAddress(String address) { + this.address = address; } - public Form1099Misc tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public Form1099Misc address2(String address2) { + this.address2 = address2; return this; } /** - * Get tinMatch - * @return tinMatch + * Address line 2. + * @return address2 */ @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; + public String getAddress2() { + return address2; } - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public void setAddress2(String address2) { + this.address2 = address2; } - public Form1099Misc tinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public Form1099Misc city(String city) { + this.city = city; return this; } /** - * Get tinMatchStatus - * @return tinMatchStatus + * City. + * @return city */ @javax.annotation.Nullable - public Form1099StatusDetail getTinMatchStatus() { - return tinMatchStatus; + public String getCity() { + return city; } - public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public void setCity(String city) { + this.city = city; } - public Form1099Misc addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public Form1099Misc state(String state) { + this.state = state; return this; } /** - * Get addressVerification - * @return addressVerification + * Two-letter US state or Canadian province code (required for US/CA addresses). + * @return state */ @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; + public String getState() { + return state; } - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public void setState(String state) { + this.state = state; } - public Form1099Misc addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public Form1099Misc zip(String zip) { + this.zip = zip; return this; } /** - * Get addressVerificationStatus - * @return addressVerificationStatus + * ZIP/postal code. + * @return zip */ @javax.annotation.Nullable - public Form1099StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; + public String getZip() { + return zip; } - public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public void setZip(String zip) { + this.zip = zip; } - public Form1099Misc eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public Form1099Misc email(String email) { + this.email = email; return this; } /** - * Get eDeliveryStatus - * @return eDeliveryStatus + * Recipient's Contact email address. + * @return email */ @javax.annotation.Nullable - public Form1099StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; + public String getEmail() { + return email; } - public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public void setEmail(String email) { + this.email = email; } - public Form1099Misc referenceId(String referenceId) { - this.referenceId = referenceId; + public Form1099Misc accountNumber(String accountNumber) { + this.accountNumber = accountNumber; return this; } /** - * Get referenceId - * @return referenceId + * Account number + * @return accountNumber */ @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; + public String getAccountNumber() { + return accountNumber; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; } - public Form1099Misc email(String email) { - this.email = email; + public Form1099Misc officeCode(String officeCode) { + this.officeCode = officeCode; return this; } /** - * Get email - * @return email + * Office code + * @return officeCode */ @javax.annotation.Nullable - public String getEmail() { - return email; + public String getOfficeCode() { + return officeCode; } - public void setEmail(String email) { - this.email = email; + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; } - public Form1099Misc tinType(String tinType) { - this.tinType = tinType; + public Form1099Misc nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get tinType - * @return tinType + * Province or region for non-US/CA addresses. + * @return nonUsProvince */ @javax.annotation.Nullable - public String getTinType() { - return tinType; + public String getNonUsProvince() { + return nonUsProvince; } - public void setTinType(String tinType) { - this.tinType = tinType; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } - public Form1099Misc fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public Form1099Misc countryCode(String countryCode) { + this.countryCode = countryCode; return this; } /** - * Get fatcaFilingRequirement - * @return fatcaFilingRequirement + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode */ @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; + public String getCountryCode() { + return countryCode; } - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; } - public Form1099Misc tin(String tin) { - this.tin = tin; + public Form1099Misc federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; return this; } /** - * Get tin - * @return tin + * Date when federal e-filing should be scheduled for this form + * @return federalEfileDate */ @javax.annotation.Nullable - public String getTin() { - return tin; + public LocalDate getFederalEfileDate() { + return federalEfileDate; } - public void setTin(String tin) { - this.tin = tin; + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; } - public Form1099Misc noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099Misc postalMail(Boolean postalMail) { + this.postalMail = postalMail; return this; } /** - * Get noTin - * @return noTin + * Boolean indicating that postal mailing to the recipient should be scheduled for this form + * @return postalMail */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getPostalMail() { + return postalMail; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; } - public Form1099Misc secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public Form1099Misc stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; return this; } /** - * Get secondTinNotice - * @return secondTinNotice + * Date when state e-filing should be scheduled for this form + * @return stateEfileDate */ @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; + public LocalDate getStateEfileDate() { + return stateEfileDate; } - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; } - public Form1099Misc recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099Misc recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; return this; } /** - * Get recipientName - * @return recipientName + * Date when recipient e-delivery should be scheduled for this form + * @return recipientEdeliveryDate */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; } - public Form1099Misc recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public Form1099Misc tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; return this; } /** - * Get recipientSecondName - * @return recipientSecondName + * Boolean indicating that TIN Matching should be scheduled for this form + * @return tinMatch */ @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; + public Boolean getTinMatch() { + return tinMatch; } - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; } - public Form1099Misc address(String address) { - this.address = address; + public Form1099Misc noTin(Boolean noTin) { + this.noTin = noTin; return this; } /** - * Get address - * @return address + * No TIN indicator + * @return noTin */ @javax.annotation.Nullable - public String getAddress() { - return address; + public Boolean getNoTin() { + return noTin; } - public void setAddress(String address) { - this.address = address; + public void setNoTin(Boolean noTin) { + this.noTin = noTin; } - public Form1099Misc address2(String address2) { - this.address2 = address2; + public Form1099Misc addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * Get address2 - * @return address2 + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public String getAddress2() { - return address2; + public Boolean getAddressVerification() { + return addressVerification; } - public void setAddress2(String address2) { - this.address2 = address2; + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } - public Form1099Misc city(String city) { - this.city = city; + public Form1099Misc stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; return this; } /** - * Get city - * @return city + * State and local withholding information + * @return stateAndLocalWithholding */ @javax.annotation.Nullable - public String getCity() { - return city; + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; } - public void setCity(String city) { - this.city = city; + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; } - public Form1099Misc state(String state) { - this.state = state; + public Form1099Misc secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; return this; } /** - * Get state - * @return state + * Second TIN notice + * @return secondTinNotice */ @javax.annotation.Nullable - public String getState() { - return state; + public Boolean getSecondTinNotice() { + return secondTinNotice; } - public void setState(String state) { - this.state = state; + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; } - public Form1099Misc zip(String zip) { - this.zip = zip; - return this; - } - /** - * Get zip - * @return zip + * Federal e-file status + * @return federalEfileStatus */ @javax.annotation.Nullable - public String getZip() { - return zip; + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; } - public void setZip(String zip) { - this.zip = zip; - } - public Form1099Misc nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - /** - * Get nonUsProvince - * @return nonUsProvince + * State e-file status + * @return stateEfileStatus */ @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; + public List getStateEfileStatus() { + return stateEfileStatus; } - public Form1099Misc countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } /** - * Get countryCode - * @return countryCode + * Postal mail to recipient status + * @return postalMailStatus */ @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; } - public Form1099Misc accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } /** - * Get accountNumber - * @return accountNumber + * TIN Match status + * @return tinMatchStatus */ @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; } - public Form1099Misc officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } /** - * Get officeCode - * @return officeCode + * Address verification status + * @return addressVerificationStatus */ @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; } - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - public Form1099Misc validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; + /** + * EDelivery status + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; } - public Form1099Misc addValidationErrorsItem(ValidationError validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } + /** - * Get validationErrors + * Validation errors * @return validationErrors */ @javax.annotation.Nullable @@ -1241,18 +1356,10 @@ public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - public Form1099Misc createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - /** - * Get createdAt + * Date time when the record was created. * @return createdAt */ @javax.annotation.Nullable @@ -1260,18 +1367,10 @@ public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - public Form1099Misc updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - /** - * Get updatedAt + * Date time when the record was last updated. * @return updatedAt */ @javax.annotation.Nullable @@ -1279,28 +1378,6 @@ public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099Misc stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholding getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } @@ -1316,56 +1393,57 @@ public boolean equals(Object o) { return Objects.equals(this.rents, form1099Misc.rents) && Objects.equals(this.royalties, form1099Misc.royalties) && Objects.equals(this.otherIncome, form1099Misc.otherIncome) && - Objects.equals(this.fedIncomeTaxWithheld, form1099Misc.fedIncomeTaxWithheld) && + Objects.equals(this.federalIncomeTaxWithheld, form1099Misc.federalIncomeTaxWithheld) && Objects.equals(this.fishingBoatProceeds, form1099Misc.fishingBoatProceeds) && Objects.equals(this.medicalAndHealthCarePayments, form1099Misc.medicalAndHealthCarePayments) && - Objects.equals(this.substitutePayments, form1099Misc.substitutePayments) && Objects.equals(this.directSalesIndicator, form1099Misc.directSalesIndicator) && + Objects.equals(this.substitutePayments, form1099Misc.substitutePayments) && Objects.equals(this.cropInsuranceProceeds, form1099Misc.cropInsuranceProceeds) && - Objects.equals(this.excessGoldenParachutePayments, form1099Misc.excessGoldenParachutePayments) && Objects.equals(this.grossProceedsPaidToAttorney, form1099Misc.grossProceedsPaidToAttorney) && Objects.equals(this.fishPurchasedForResale, form1099Misc.fishPurchasedForResale) && Objects.equals(this.section409ADeferrals, form1099Misc.section409ADeferrals) && + Objects.equals(this.excessGoldenParachutePayments, form1099Misc.excessGoldenParachutePayments) && Objects.equals(this.nonqualifiedDeferredCompensation, form1099Misc.nonqualifiedDeferredCompensation) && - Objects.equals(this.id, form1099Misc.id) && + Objects.equals(this.fatcaFilingRequirement, form1099Misc.fatcaFilingRequirement) && Objects.equals(this.type, form1099Misc.type) && + Objects.equals(this.id, form1099Misc.id) && Objects.equals(this.issuerId, form1099Misc.issuerId) && Objects.equals(this.issuerReferenceId, form1099Misc.issuerReferenceId) && Objects.equals(this.issuerTin, form1099Misc.issuerTin) && Objects.equals(this.taxYear, form1099Misc.taxYear) && - Objects.equals(this.federalEfile, form1099Misc.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099Misc.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099Misc.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099Misc.stateEfileStatus) && - Objects.equals(this.postalMail, form1099Misc.postalMail) && - Objects.equals(this.postalMailStatus, form1099Misc.postalMailStatus) && - Objects.equals(this.tinMatch, form1099Misc.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099Misc.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099Misc.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099Misc.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099Misc.eDeliveryStatus) && Objects.equals(this.referenceId, form1099Misc.referenceId) && - Objects.equals(this.email, form1099Misc.email) && - Objects.equals(this.tinType, form1099Misc.tinType) && - Objects.equals(this.fatcaFilingRequirement, form1099Misc.fatcaFilingRequirement) && Objects.equals(this.tin, form1099Misc.tin) && - Objects.equals(this.noTin, form1099Misc.noTin) && - Objects.equals(this.secondTinNotice, form1099Misc.secondTinNotice) && Objects.equals(this.recipientName, form1099Misc.recipientName) && + Objects.equals(this.tinType, form1099Misc.tinType) && Objects.equals(this.recipientSecondName, form1099Misc.recipientSecondName) && Objects.equals(this.address, form1099Misc.address) && Objects.equals(this.address2, form1099Misc.address2) && Objects.equals(this.city, form1099Misc.city) && Objects.equals(this.state, form1099Misc.state) && Objects.equals(this.zip, form1099Misc.zip) && - Objects.equals(this.nonUsProvince, form1099Misc.nonUsProvince) && - Objects.equals(this.countryCode, form1099Misc.countryCode) && + Objects.equals(this.email, form1099Misc.email) && Objects.equals(this.accountNumber, form1099Misc.accountNumber) && Objects.equals(this.officeCode, form1099Misc.officeCode) && + Objects.equals(this.nonUsProvince, form1099Misc.nonUsProvince) && + Objects.equals(this.countryCode, form1099Misc.countryCode) && + Objects.equals(this.federalEfileDate, form1099Misc.federalEfileDate) && + Objects.equals(this.postalMail, form1099Misc.postalMail) && + Objects.equals(this.stateEfileDate, form1099Misc.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099Misc.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099Misc.tinMatch) && + Objects.equals(this.noTin, form1099Misc.noTin) && + Objects.equals(this.addressVerification, form1099Misc.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099Misc.stateAndLocalWithholding) && + Objects.equals(this.secondTinNotice, form1099Misc.secondTinNotice) && + Objects.equals(this.federalEfileStatus, form1099Misc.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099Misc.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099Misc.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099Misc.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099Misc.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099Misc.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099Misc.validationErrors) && Objects.equals(this.createdAt, form1099Misc.createdAt) && - Objects.equals(this.updatedAt, form1099Misc.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099Misc.stateAndLocalWithholding); + Objects.equals(this.updatedAt, form1099Misc.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1374,7 +1452,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalAndHealthCarePayments, substitutePayments, directSalesIndicator, cropInsuranceProceeds, excessGoldenParachutePayments, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, nonqualifiedDeferredCompensation, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, fatcaFilingRequirement, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(rents, royalties, otherIncome, federalIncomeTaxWithheld, fishingBoatProceeds, medicalAndHealthCarePayments, directSalesIndicator, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, fatcaFilingRequirement, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -1391,56 +1469,57 @@ public String toString() { sb.append(" rents: ").append(toIndentedString(rents)).append("\n"); sb.append(" royalties: ").append(toIndentedString(royalties)).append("\n"); sb.append(" otherIncome: ").append(toIndentedString(otherIncome)).append("\n"); - sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); sb.append(" fishingBoatProceeds: ").append(toIndentedString(fishingBoatProceeds)).append("\n"); sb.append(" medicalAndHealthCarePayments: ").append(toIndentedString(medicalAndHealthCarePayments)).append("\n"); - sb.append(" substitutePayments: ").append(toIndentedString(substitutePayments)).append("\n"); sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); + sb.append(" substitutePayments: ").append(toIndentedString(substitutePayments)).append("\n"); sb.append(" cropInsuranceProceeds: ").append(toIndentedString(cropInsuranceProceeds)).append("\n"); - sb.append(" excessGoldenParachutePayments: ").append(toIndentedString(excessGoldenParachutePayments)).append("\n"); sb.append(" grossProceedsPaidToAttorney: ").append(toIndentedString(grossProceedsPaidToAttorney)).append("\n"); sb.append(" fishPurchasedForResale: ").append(toIndentedString(fishPurchasedForResale)).append("\n"); sb.append(" section409ADeferrals: ").append(toIndentedString(section409ADeferrals)).append("\n"); + sb.append(" excessGoldenParachutePayments: ").append(toIndentedString(excessGoldenParachutePayments)).append("\n"); sb.append(" nonqualifiedDeferredCompensation: ").append(toIndentedString(nonqualifiedDeferredCompensation)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1463,48 +1542,53 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("id"); openapiFields.add("type"); + openapiFields.add("id"); openapiFields.add("issuerId"); openapiFields.add("issuerReferenceId"); openapiFields.add("issuerTin"); openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); + openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); + openapiFields.add("email"); openapiFields.add("accountNumber"); openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("secondTinNotice"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1527,12 +1611,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099Misc` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099Misc.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); } if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); @@ -1540,55 +1636,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } @@ -1607,17 +1670,58 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); @@ -1633,10 +1737,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscList.java deleted file mode 100644 index bdbab81..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscList.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1099MiscListItem; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099MiscList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099MiscList { - public static final String SERIALIZED_NAME_FORMS = "forms"; - @SerializedName(SERIALIZED_NAME_FORMS) - private List forms; - - public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; - @SerializedName(SERIALIZED_NAME_FORM_TYPE) - private String formType; - - public Form1099MiscList() { - } - - public Form1099MiscList forms(List forms) { - this.forms = forms; - return this; - } - - public Form1099MiscList addFormsItem(Form1099MiscListItem formsItem) { - if (this.forms == null) { - this.forms = new ArrayList<>(); - } - this.forms.add(formsItem); - return this; - } - - /** - * Get forms - * @return forms - */ - @javax.annotation.Nullable - public List getForms() { - return forms; - } - - public void setForms(List forms) { - this.forms = forms; - } - - - public Form1099MiscList formType(String formType) { - this.formType = formType; - return this; - } - - /** - * Get formType - * @return formType - */ - @javax.annotation.Nullable - public String getFormType() { - return formType; - } - - public void setFormType(String formType) { - this.formType = formType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099MiscList form1099MiscList = (Form1099MiscList) o; - return Objects.equals(this.forms, form1099MiscList.forms) && - Objects.equals(this.formType, form1099MiscList.formType); - } - - @Override - public int hashCode() { - return Objects.hash(forms, formType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099MiscList {\n"); - sb.append(" forms: ").append(toIndentedString(forms)).append("\n"); - sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("formType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099MiscList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099MiscList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099MiscList is not found in the empty JSON string", Form1099MiscList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099MiscList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099MiscList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("forms") != null && !jsonObj.get("forms").isJsonNull()) { - JsonArray jsonArrayforms = jsonObj.getAsJsonArray("forms"); - if (jsonArrayforms != null) { - // ensure the json data is an array - if (!jsonObj.get("forms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `forms` to be an array in the JSON string but got `%s`", jsonObj.get("forms").toString())); - } - - // validate the optional field `forms` (array) - for (int i = 0; i < jsonArrayforms.size(); i++) { - Form1099MiscListItem.validateJsonElement(jsonArrayforms.get(i)); - }; - } - } - if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099MiscList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099MiscList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099MiscList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099MiscList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099MiscList given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099MiscList - * @throws IOException if the JSON string is invalid with respect to Form1099MiscList - */ - public static Form1099MiscList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099MiscList.class); - } - - /** - * Convert an instance of Form1099MiscList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItem.java deleted file mode 100644 index 8aa519b..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItem.java +++ /dev/null @@ -1,1400 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099MiscListItem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099MiscListItem { - public static final String SERIALIZED_NAME_RENTS = "rents"; - @SerializedName(SERIALIZED_NAME_RENTS) - private Double rents; - - public static final String SERIALIZED_NAME_ROYALTIES = "royalties"; - @SerializedName(SERIALIZED_NAME_ROYALTIES) - private Double royalties; - - public static final String SERIALIZED_NAME_OTHER_INCOME = "otherIncome"; - @SerializedName(SERIALIZED_NAME_OTHER_INCOME) - private Double otherIncome; - - public static final String SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD = "fedIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD) - private Double fedIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_FISHING_BOAT_PROCEEDS = "fishingBoatProceeds"; - @SerializedName(SERIALIZED_NAME_FISHING_BOAT_PROCEEDS) - private Double fishingBoatProceeds; - - public static final String SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE_PAYMENTS = "medicalAndHealthCarePayments"; - @SerializedName(SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE_PAYMENTS) - private Double medicalAndHealthCarePayments; - - public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; - @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) - private Boolean directSalesIndicator; - - public static final String SERIALIZED_NAME_SUBSTITUTE_PAYMENTS = "substitutePayments"; - @SerializedName(SERIALIZED_NAME_SUBSTITUTE_PAYMENTS) - private Double substitutePayments; - - public static final String SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS = "cropInsuranceProceeds"; - @SerializedName(SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS) - private Double cropInsuranceProceeds; - - public static final String SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY = "grossProceedsPaidToAttorney"; - @SerializedName(SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY) - private Double grossProceedsPaidToAttorney; - - public static final String SERIALIZED_NAME_FISH_PURCHASED_FOR_RESALE = "fishPurchasedForResale"; - @SerializedName(SERIALIZED_NAME_FISH_PURCHASED_FOR_RESALE) - private Double fishPurchasedForResale; - - public static final String SERIALIZED_NAME_SECTION409_A_DEFERRALS = "section409ADeferrals"; - @SerializedName(SERIALIZED_NAME_SECTION409_A_DEFERRALS) - private Double section409ADeferrals; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS = "excessGoldenParachutePayments"; - @SerializedName(SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS) - private Double excessGoldenParachutePayments; - - public static final String SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION = "nonqualifiedDeferredCompensation"; - @SerializedName(SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION) - private Double nonqualifiedDeferredCompensation; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099MiscListItem() { - } - - public Form1099MiscListItem rents(Double rents) { - this.rents = rents; - return this; - } - - /** - * Rents - * @return rents - */ - @javax.annotation.Nullable - public Double getRents() { - return rents; - } - - public void setRents(Double rents) { - this.rents = rents; - } - - - public Form1099MiscListItem royalties(Double royalties) { - this.royalties = royalties; - return this; - } - - /** - * Royalties - * @return royalties - */ - @javax.annotation.Nullable - public Double getRoyalties() { - return royalties; - } - - public void setRoyalties(Double royalties) { - this.royalties = royalties; - } - - - public Form1099MiscListItem otherIncome(Double otherIncome) { - this.otherIncome = otherIncome; - return this; - } - - /** - * Other income - * @return otherIncome - */ - @javax.annotation.Nullable - public Double getOtherIncome() { - return otherIncome; - } - - public void setOtherIncome(Double otherIncome) { - this.otherIncome = otherIncome; - } - - - public Form1099MiscListItem fedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return fedIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFedIncomeTaxWithheld() { - return fedIncomeTaxWithheld; - } - - public void setFedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; - } - - - public Form1099MiscListItem fishingBoatProceeds(Double fishingBoatProceeds) { - this.fishingBoatProceeds = fishingBoatProceeds; - return this; - } - - /** - * Fishing boat proceeds - * @return fishingBoatProceeds - */ - @javax.annotation.Nullable - public Double getFishingBoatProceeds() { - return fishingBoatProceeds; - } - - public void setFishingBoatProceeds(Double fishingBoatProceeds) { - this.fishingBoatProceeds = fishingBoatProceeds; - } - - - public Form1099MiscListItem medicalAndHealthCarePayments(Double medicalAndHealthCarePayments) { - this.medicalAndHealthCarePayments = medicalAndHealthCarePayments; - return this; - } - - /** - * Medical and health care payments - * @return medicalAndHealthCarePayments - */ - @javax.annotation.Nullable - public Double getMedicalAndHealthCarePayments() { - return medicalAndHealthCarePayments; - } - - public void setMedicalAndHealthCarePayments(Double medicalAndHealthCarePayments) { - this.medicalAndHealthCarePayments = medicalAndHealthCarePayments; - } - - - public Form1099MiscListItem directSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - return this; - } - - /** - * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * @return directSalesIndicator - */ - @javax.annotation.Nullable - public Boolean getDirectSalesIndicator() { - return directSalesIndicator; - } - - public void setDirectSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - } - - - public Form1099MiscListItem substitutePayments(Double substitutePayments) { - this.substitutePayments = substitutePayments; - return this; - } - - /** - * Substitute payments in lieu of dividends or interest - * @return substitutePayments - */ - @javax.annotation.Nullable - public Double getSubstitutePayments() { - return substitutePayments; - } - - public void setSubstitutePayments(Double substitutePayments) { - this.substitutePayments = substitutePayments; - } - - - public Form1099MiscListItem cropInsuranceProceeds(Double cropInsuranceProceeds) { - this.cropInsuranceProceeds = cropInsuranceProceeds; - return this; - } - - /** - * Crop insurance proceeds - * @return cropInsuranceProceeds - */ - @javax.annotation.Nullable - public Double getCropInsuranceProceeds() { - return cropInsuranceProceeds; - } - - public void setCropInsuranceProceeds(Double cropInsuranceProceeds) { - this.cropInsuranceProceeds = cropInsuranceProceeds; - } - - - public Form1099MiscListItem grossProceedsPaidToAttorney(Double grossProceedsPaidToAttorney) { - this.grossProceedsPaidToAttorney = grossProceedsPaidToAttorney; - return this; - } - - /** - * Gross proceeds paid to an attorney - * @return grossProceedsPaidToAttorney - */ - @javax.annotation.Nullable - public Double getGrossProceedsPaidToAttorney() { - return grossProceedsPaidToAttorney; - } - - public void setGrossProceedsPaidToAttorney(Double grossProceedsPaidToAttorney) { - this.grossProceedsPaidToAttorney = grossProceedsPaidToAttorney; - } - - - public Form1099MiscListItem fishPurchasedForResale(Double fishPurchasedForResale) { - this.fishPurchasedForResale = fishPurchasedForResale; - return this; - } - - /** - * Fish purchased for resale - * @return fishPurchasedForResale - */ - @javax.annotation.Nullable - public Double getFishPurchasedForResale() { - return fishPurchasedForResale; - } - - public void setFishPurchasedForResale(Double fishPurchasedForResale) { - this.fishPurchasedForResale = fishPurchasedForResale; - } - - - public Form1099MiscListItem section409ADeferrals(Double section409ADeferrals) { - this.section409ADeferrals = section409ADeferrals; - return this; - } - - /** - * Section 409A deferrals - * @return section409ADeferrals - */ - @javax.annotation.Nullable - public Double getSection409ADeferrals() { - return section409ADeferrals; - } - - public void setSection409ADeferrals(Double section409ADeferrals) { - this.section409ADeferrals = section409ADeferrals; - } - - - public Form1099MiscListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099MiscListItem excessGoldenParachutePayments(Double excessGoldenParachutePayments) { - this.excessGoldenParachutePayments = excessGoldenParachutePayments; - return this; - } - - /** - * (Legacy field) Excess golden parachute payments - * @return excessGoldenParachutePayments - */ - @javax.annotation.Nullable - public Double getExcessGoldenParachutePayments() { - return excessGoldenParachutePayments; - } - - public void setExcessGoldenParachutePayments(Double excessGoldenParachutePayments) { - this.excessGoldenParachutePayments = excessGoldenParachutePayments; - } - - - public Form1099MiscListItem nonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { - this.nonqualifiedDeferredCompensation = nonqualifiedDeferredCompensation; - return this; - } - - /** - * Nonqualified deferred compensation - * @return nonqualifiedDeferredCompensation - */ - @javax.annotation.Nullable - public Double getNonqualifiedDeferredCompensation() { - return nonqualifiedDeferredCompensation; - } - - public void setNonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { - this.nonqualifiedDeferredCompensation = nonqualifiedDeferredCompensation; - } - - - public Form1099MiscListItem issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099MiscListItem issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099MiscListItem taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nonnull - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099MiscListItem issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099MiscListItem referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099MiscListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099MiscListItem recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099MiscListItem tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099MiscListItem recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099MiscListItem address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099MiscListItem address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099MiscListItem city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099MiscListItem state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099MiscListItem zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099MiscListItem email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099MiscListItem accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099MiscListItem officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099MiscListItem nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099MiscListItem countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099MiscListItem federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099MiscListItem postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099MiscListItem stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099MiscListItem tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099MiscListItem noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099MiscListItem secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099MiscListItem addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099MiscListItem stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099MiscListItem form1099MiscListItem = (Form1099MiscListItem) o; - return Objects.equals(this.rents, form1099MiscListItem.rents) && - Objects.equals(this.royalties, form1099MiscListItem.royalties) && - Objects.equals(this.otherIncome, form1099MiscListItem.otherIncome) && - Objects.equals(this.fedIncomeTaxWithheld, form1099MiscListItem.fedIncomeTaxWithheld) && - Objects.equals(this.fishingBoatProceeds, form1099MiscListItem.fishingBoatProceeds) && - Objects.equals(this.medicalAndHealthCarePayments, form1099MiscListItem.medicalAndHealthCarePayments) && - Objects.equals(this.directSalesIndicator, form1099MiscListItem.directSalesIndicator) && - Objects.equals(this.substitutePayments, form1099MiscListItem.substitutePayments) && - Objects.equals(this.cropInsuranceProceeds, form1099MiscListItem.cropInsuranceProceeds) && - Objects.equals(this.grossProceedsPaidToAttorney, form1099MiscListItem.grossProceedsPaidToAttorney) && - Objects.equals(this.fishPurchasedForResale, form1099MiscListItem.fishPurchasedForResale) && - Objects.equals(this.section409ADeferrals, form1099MiscListItem.section409ADeferrals) && - Objects.equals(this.fatcaFilingRequirement, form1099MiscListItem.fatcaFilingRequirement) && - Objects.equals(this.excessGoldenParachutePayments, form1099MiscListItem.excessGoldenParachutePayments) && - Objects.equals(this.nonqualifiedDeferredCompensation, form1099MiscListItem.nonqualifiedDeferredCompensation) && - Objects.equals(this.issuerReferenceId, form1099MiscListItem.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099MiscListItem.issuerTin) && - Objects.equals(this.taxYear, form1099MiscListItem.taxYear) && - Objects.equals(this.issuerId, form1099MiscListItem.issuerId) && - Objects.equals(this.referenceId, form1099MiscListItem.referenceId) && - Objects.equals(this.recipientTin, form1099MiscListItem.recipientTin) && - Objects.equals(this.recipientName, form1099MiscListItem.recipientName) && - Objects.equals(this.tinType, form1099MiscListItem.tinType) && - Objects.equals(this.recipientSecondName, form1099MiscListItem.recipientSecondName) && - Objects.equals(this.address, form1099MiscListItem.address) && - Objects.equals(this.address2, form1099MiscListItem.address2) && - Objects.equals(this.city, form1099MiscListItem.city) && - Objects.equals(this.state, form1099MiscListItem.state) && - Objects.equals(this.zip, form1099MiscListItem.zip) && - Objects.equals(this.email, form1099MiscListItem.email) && - Objects.equals(this.accountNumber, form1099MiscListItem.accountNumber) && - Objects.equals(this.officeCode, form1099MiscListItem.officeCode) && - Objects.equals(this.nonUsProvince, form1099MiscListItem.nonUsProvince) && - Objects.equals(this.countryCode, form1099MiscListItem.countryCode) && - Objects.equals(this.federalEFile, form1099MiscListItem.federalEFile) && - Objects.equals(this.postalMail, form1099MiscListItem.postalMail) && - Objects.equals(this.stateEFile, form1099MiscListItem.stateEFile) && - Objects.equals(this.tinMatch, form1099MiscListItem.tinMatch) && - Objects.equals(this.noTin, form1099MiscListItem.noTin) && - Objects.equals(this.secondTinNotice, form1099MiscListItem.secondTinNotice) && - Objects.equals(this.addressVerification, form1099MiscListItem.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099MiscListItem.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalAndHealthCarePayments, directSalesIndicator, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, fatcaFilingRequirement, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099MiscListItem {\n"); - sb.append(" rents: ").append(toIndentedString(rents)).append("\n"); - sb.append(" royalties: ").append(toIndentedString(royalties)).append("\n"); - sb.append(" otherIncome: ").append(toIndentedString(otherIncome)).append("\n"); - sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); - sb.append(" fishingBoatProceeds: ").append(toIndentedString(fishingBoatProceeds)).append("\n"); - sb.append(" medicalAndHealthCarePayments: ").append(toIndentedString(medicalAndHealthCarePayments)).append("\n"); - sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); - sb.append(" substitutePayments: ").append(toIndentedString(substitutePayments)).append("\n"); - sb.append(" cropInsuranceProceeds: ").append(toIndentedString(cropInsuranceProceeds)).append("\n"); - sb.append(" grossProceedsPaidToAttorney: ").append(toIndentedString(grossProceedsPaidToAttorney)).append("\n"); - sb.append(" fishPurchasedForResale: ").append(toIndentedString(fishPurchasedForResale)).append("\n"); - sb.append(" section409ADeferrals: ").append(toIndentedString(section409ADeferrals)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" excessGoldenParachutePayments: ").append(toIndentedString(excessGoldenParachutePayments)).append("\n"); - sb.append(" nonqualifiedDeferredCompensation: ").append(toIndentedString(nonqualifiedDeferredCompensation)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("taxYear"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099MiscListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099MiscListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099MiscListItem is not found in the empty JSON string", Form1099MiscListItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099MiscListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099MiscListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099MiscListItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099MiscListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099MiscListItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscListItem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099MiscListItem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099MiscListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099MiscListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099MiscListItem - * @throws IOException if the JSON string is invalid with respect to Form1099MiscListItem - */ - public static Form1099MiscListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099MiscListItem.class); - } - - /** - * Convert an instance of Form1099MiscListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItemResponse.java deleted file mode 100644 index ee9b9c4..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItemResponse.java +++ /dev/null @@ -1,1635 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099MiscListItemResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099MiscListItemResponse { - public static final String SERIALIZED_NAME_RENTS = "rents"; - @SerializedName(SERIALIZED_NAME_RENTS) - private Double rents; - - public static final String SERIALIZED_NAME_ROYALTIES = "royalties"; - @SerializedName(SERIALIZED_NAME_ROYALTIES) - private Double royalties; - - public static final String SERIALIZED_NAME_OTHER_INCOME = "otherIncome"; - @SerializedName(SERIALIZED_NAME_OTHER_INCOME) - private Double otherIncome; - - public static final String SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD = "fedIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD) - private Double fedIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_FISHING_BOAT_PROCEEDS = "fishingBoatProceeds"; - @SerializedName(SERIALIZED_NAME_FISHING_BOAT_PROCEEDS) - private Double fishingBoatProceeds; - - public static final String SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE_PAYMENTS = "medicalAndHealthCarePayments"; - @SerializedName(SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE_PAYMENTS) - private Double medicalAndHealthCarePayments; - - public static final String SERIALIZED_NAME_SUBSTITUTE_PAYMENTS = "substitutePayments"; - @SerializedName(SERIALIZED_NAME_SUBSTITUTE_PAYMENTS) - private Double substitutePayments; - - public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; - @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) - private Boolean directSalesIndicator; - - public static final String SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS = "cropInsuranceProceeds"; - @SerializedName(SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS) - private Double cropInsuranceProceeds; - - public static final String SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS = "excessGoldenParachutePayments"; - @SerializedName(SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS) - private Double excessGoldenParachutePayments; - - public static final String SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY = "grossProceedsPaidToAttorney"; - @SerializedName(SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY) - private Double grossProceedsPaidToAttorney; - - public static final String SERIALIZED_NAME_FISH_PURCHASED_FOR_RESALE = "fishPurchasedForResale"; - @SerializedName(SERIALIZED_NAME_FISH_PURCHASED_FOR_RESALE) - private Double fishPurchasedForResale; - - public static final String SERIALIZED_NAME_SECTION409_A_DEFERRALS = "section409ADeferrals"; - @SerializedName(SERIALIZED_NAME_SECTION409_A_DEFERRALS) - private Double section409ADeferrals; - - public static final String SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION = "nonqualifiedDeferredCompensation"; - @SerializedName(SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION) - private Double nonqualifiedDeferredCompensation; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - public Form1099MiscListItemResponse() { - } - - public Form1099MiscListItemResponse( - String id, - StatusDetail federalEfileStatus, - List stateEfileStatus, - StatusDetail postalMailStatus, - StatusDetail tinMatchStatus, - StatusDetail addressVerificationStatus, - StatusDetail eDeliveryStatus, - List validationErrors, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.id = id; - this.federalEfileStatus = federalEfileStatus; - this.stateEfileStatus = stateEfileStatus; - this.postalMailStatus = postalMailStatus; - this.tinMatchStatus = tinMatchStatus; - this.addressVerificationStatus = addressVerificationStatus; - this.eDeliveryStatus = eDeliveryStatus; - this.validationErrors = validationErrors; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - public Form1099MiscListItemResponse rents(Double rents) { - this.rents = rents; - return this; - } - - /** - * Rents - * @return rents - */ - @javax.annotation.Nullable - public Double getRents() { - return rents; - } - - public void setRents(Double rents) { - this.rents = rents; - } - - - public Form1099MiscListItemResponse royalties(Double royalties) { - this.royalties = royalties; - return this; - } - - /** - * Royalties - * @return royalties - */ - @javax.annotation.Nullable - public Double getRoyalties() { - return royalties; - } - - public void setRoyalties(Double royalties) { - this.royalties = royalties; - } - - - public Form1099MiscListItemResponse otherIncome(Double otherIncome) { - this.otherIncome = otherIncome; - return this; - } - - /** - * Other income - * @return otherIncome - */ - @javax.annotation.Nullable - public Double getOtherIncome() { - return otherIncome; - } - - public void setOtherIncome(Double otherIncome) { - this.otherIncome = otherIncome; - } - - - public Form1099MiscListItemResponse fedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return fedIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFedIncomeTaxWithheld() { - return fedIncomeTaxWithheld; - } - - public void setFedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; - } - - - public Form1099MiscListItemResponse fishingBoatProceeds(Double fishingBoatProceeds) { - this.fishingBoatProceeds = fishingBoatProceeds; - return this; - } - - /** - * Fishing boat proceeds - * @return fishingBoatProceeds - */ - @javax.annotation.Nullable - public Double getFishingBoatProceeds() { - return fishingBoatProceeds; - } - - public void setFishingBoatProceeds(Double fishingBoatProceeds) { - this.fishingBoatProceeds = fishingBoatProceeds; - } - - - public Form1099MiscListItemResponse medicalAndHealthCarePayments(Double medicalAndHealthCarePayments) { - this.medicalAndHealthCarePayments = medicalAndHealthCarePayments; - return this; - } - - /** - * Medical and health care payments - * @return medicalAndHealthCarePayments - */ - @javax.annotation.Nullable - public Double getMedicalAndHealthCarePayments() { - return medicalAndHealthCarePayments; - } - - public void setMedicalAndHealthCarePayments(Double medicalAndHealthCarePayments) { - this.medicalAndHealthCarePayments = medicalAndHealthCarePayments; - } - - - public Form1099MiscListItemResponse substitutePayments(Double substitutePayments) { - this.substitutePayments = substitutePayments; - return this; - } - - /** - * Substitute payments in lieu of dividends or interest - * @return substitutePayments - */ - @javax.annotation.Nullable - public Double getSubstitutePayments() { - return substitutePayments; - } - - public void setSubstitutePayments(Double substitutePayments) { - this.substitutePayments = substitutePayments; - } - - - public Form1099MiscListItemResponse directSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - return this; - } - - /** - * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * @return directSalesIndicator - */ - @javax.annotation.Nullable - public Boolean getDirectSalesIndicator() { - return directSalesIndicator; - } - - public void setDirectSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - } - - - public Form1099MiscListItemResponse cropInsuranceProceeds(Double cropInsuranceProceeds) { - this.cropInsuranceProceeds = cropInsuranceProceeds; - return this; - } - - /** - * Crop insurance proceeds - * @return cropInsuranceProceeds - */ - @javax.annotation.Nullable - public Double getCropInsuranceProceeds() { - return cropInsuranceProceeds; - } - - public void setCropInsuranceProceeds(Double cropInsuranceProceeds) { - this.cropInsuranceProceeds = cropInsuranceProceeds; - } - - - public Form1099MiscListItemResponse excessGoldenParachutePayments(Double excessGoldenParachutePayments) { - this.excessGoldenParachutePayments = excessGoldenParachutePayments; - return this; - } - - /** - * (Legacy field) Excess golden parachute payments - * @return excessGoldenParachutePayments - */ - @javax.annotation.Nullable - public Double getExcessGoldenParachutePayments() { - return excessGoldenParachutePayments; - } - - public void setExcessGoldenParachutePayments(Double excessGoldenParachutePayments) { - this.excessGoldenParachutePayments = excessGoldenParachutePayments; - } - - - public Form1099MiscListItemResponse grossProceedsPaidToAttorney(Double grossProceedsPaidToAttorney) { - this.grossProceedsPaidToAttorney = grossProceedsPaidToAttorney; - return this; - } - - /** - * Gross proceeds paid to an attorney - * @return grossProceedsPaidToAttorney - */ - @javax.annotation.Nullable - public Double getGrossProceedsPaidToAttorney() { - return grossProceedsPaidToAttorney; - } - - public void setGrossProceedsPaidToAttorney(Double grossProceedsPaidToAttorney) { - this.grossProceedsPaidToAttorney = grossProceedsPaidToAttorney; - } - - - public Form1099MiscListItemResponse fishPurchasedForResale(Double fishPurchasedForResale) { - this.fishPurchasedForResale = fishPurchasedForResale; - return this; - } - - /** - * Fish purchased for resale - * @return fishPurchasedForResale - */ - @javax.annotation.Nullable - public Double getFishPurchasedForResale() { - return fishPurchasedForResale; - } - - public void setFishPurchasedForResale(Double fishPurchasedForResale) { - this.fishPurchasedForResale = fishPurchasedForResale; - } - - - public Form1099MiscListItemResponse section409ADeferrals(Double section409ADeferrals) { - this.section409ADeferrals = section409ADeferrals; - return this; - } - - /** - * Section 409A deferrals - * @return section409ADeferrals - */ - @javax.annotation.Nullable - public Double getSection409ADeferrals() { - return section409ADeferrals; - } - - public void setSection409ADeferrals(Double section409ADeferrals) { - this.section409ADeferrals = section409ADeferrals; - } - - - public Form1099MiscListItemResponse nonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { - this.nonqualifiedDeferredCompensation = nonqualifiedDeferredCompensation; - return this; - } - - /** - * Nonqualified deferred compensation - * @return nonqualifiedDeferredCompensation - */ - @javax.annotation.Nullable - public Double getNonqualifiedDeferredCompensation() { - return nonqualifiedDeferredCompensation; - } - - public void setNonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { - this.nonqualifiedDeferredCompensation = nonqualifiedDeferredCompensation; - } - - - /** - * ID of the form - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - - public Form1099MiscListItemResponse type(String type) { - this.type = type; - return this; - } - - /** - * Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public Form1099MiscListItemResponse issuerId(Integer issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nonnull - public Integer getIssuerId() { - return issuerId; - } - - public void setIssuerId(Integer issuerId) { - this.issuerId = issuerId; - } - - - public Form1099MiscListItemResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099MiscListItemResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099MiscListItemResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099MiscListItemResponse federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Boolean indicating that federal e-filing has been scheduled for this form - * @return federalEfile - */ - @javax.annotation.Nonnull - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - /** - * Federal e-file status - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - - - public Form1099MiscListItemResponse stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - return this; - } - - /** - * Boolean indicating that state e-filing has been scheduled for this form - * @return stateEfile - */ - @javax.annotation.Nonnull - public Boolean getStateEfile() { - return stateEfile; - } - - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - } - - - /** - * State e-file status - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - - - public Form1099MiscListItemResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient has been scheduled for this form - * @return postalMail - */ - @javax.annotation.Nonnull - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - /** - * Postal mail to recipient status - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - - - public Form1099MiscListItemResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching has been scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nonnull - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - /** - * TIN Match status - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - - - public Form1099MiscListItemResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification has been scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nonnull - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - /** - * Address verification status - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - - - /** - * EDelivery status - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - - - public Form1099MiscListItemResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099MiscListItemResponse email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099MiscListItemResponse tinType(String tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public String getTinType() { - return tinType; - } - - public void setTinType(String tinType) { - this.tinType = tinType; - } - - - public Form1099MiscListItemResponse tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Recipient Tax ID Number - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public Form1099MiscListItemResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099MiscListItemResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second Tin Notice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099MiscListItemResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099MiscListItemResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099MiscListItemResponse address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099MiscListItemResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099MiscListItemResponse city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099MiscListItemResponse state(String state) { - this.state = state; - return this; - } - - /** - * US state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099MiscListItemResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099MiscListItemResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099MiscListItemResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099MiscListItemResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account Number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099MiscListItemResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office Code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099MiscListItemResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - /** - * Validation errors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - - - /** - * Creation time - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - /** - * Update time - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - public Form1099MiscListItemResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099MiscListItemResponse form1099MiscListItemResponse = (Form1099MiscListItemResponse) o; - return Objects.equals(this.rents, form1099MiscListItemResponse.rents) && - Objects.equals(this.royalties, form1099MiscListItemResponse.royalties) && - Objects.equals(this.otherIncome, form1099MiscListItemResponse.otherIncome) && - Objects.equals(this.fedIncomeTaxWithheld, form1099MiscListItemResponse.fedIncomeTaxWithheld) && - Objects.equals(this.fishingBoatProceeds, form1099MiscListItemResponse.fishingBoatProceeds) && - Objects.equals(this.medicalAndHealthCarePayments, form1099MiscListItemResponse.medicalAndHealthCarePayments) && - Objects.equals(this.substitutePayments, form1099MiscListItemResponse.substitutePayments) && - Objects.equals(this.directSalesIndicator, form1099MiscListItemResponse.directSalesIndicator) && - Objects.equals(this.cropInsuranceProceeds, form1099MiscListItemResponse.cropInsuranceProceeds) && - Objects.equals(this.excessGoldenParachutePayments, form1099MiscListItemResponse.excessGoldenParachutePayments) && - Objects.equals(this.grossProceedsPaidToAttorney, form1099MiscListItemResponse.grossProceedsPaidToAttorney) && - Objects.equals(this.fishPurchasedForResale, form1099MiscListItemResponse.fishPurchasedForResale) && - Objects.equals(this.section409ADeferrals, form1099MiscListItemResponse.section409ADeferrals) && - Objects.equals(this.nonqualifiedDeferredCompensation, form1099MiscListItemResponse.nonqualifiedDeferredCompensation) && - Objects.equals(this.id, form1099MiscListItemResponse.id) && - Objects.equals(this.type, form1099MiscListItemResponse.type) && - Objects.equals(this.issuerId, form1099MiscListItemResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099MiscListItemResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099MiscListItemResponse.issuerTin) && - Objects.equals(this.taxYear, form1099MiscListItemResponse.taxYear) && - Objects.equals(this.federalEfile, form1099MiscListItemResponse.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099MiscListItemResponse.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099MiscListItemResponse.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099MiscListItemResponse.stateEfileStatus) && - Objects.equals(this.postalMail, form1099MiscListItemResponse.postalMail) && - Objects.equals(this.postalMailStatus, form1099MiscListItemResponse.postalMailStatus) && - Objects.equals(this.tinMatch, form1099MiscListItemResponse.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099MiscListItemResponse.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099MiscListItemResponse.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099MiscListItemResponse.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099MiscListItemResponse.eDeliveryStatus) && - Objects.equals(this.referenceId, form1099MiscListItemResponse.referenceId) && - Objects.equals(this.email, form1099MiscListItemResponse.email) && - Objects.equals(this.tinType, form1099MiscListItemResponse.tinType) && - Objects.equals(this.tin, form1099MiscListItemResponse.tin) && - Objects.equals(this.noTin, form1099MiscListItemResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099MiscListItemResponse.secondTinNotice) && - Objects.equals(this.recipientName, form1099MiscListItemResponse.recipientName) && - Objects.equals(this.recipientSecondName, form1099MiscListItemResponse.recipientSecondName) && - Objects.equals(this.address, form1099MiscListItemResponse.address) && - Objects.equals(this.address2, form1099MiscListItemResponse.address2) && - Objects.equals(this.city, form1099MiscListItemResponse.city) && - Objects.equals(this.state, form1099MiscListItemResponse.state) && - Objects.equals(this.zip, form1099MiscListItemResponse.zip) && - Objects.equals(this.nonUsProvince, form1099MiscListItemResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099MiscListItemResponse.countryCode) && - Objects.equals(this.accountNumber, form1099MiscListItemResponse.accountNumber) && - Objects.equals(this.officeCode, form1099MiscListItemResponse.officeCode) && - Objects.equals(this.fatcaFilingRequirement, form1099MiscListItemResponse.fatcaFilingRequirement) && - Objects.equals(this.validationErrors, form1099MiscListItemResponse.validationErrors) && - Objects.equals(this.createdAt, form1099MiscListItemResponse.createdAt) && - Objects.equals(this.updatedAt, form1099MiscListItemResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099MiscListItemResponse.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalAndHealthCarePayments, substitutePayments, directSalesIndicator, cropInsuranceProceeds, excessGoldenParachutePayments, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, nonqualifiedDeferredCompensation, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, fatcaFilingRequirement, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099MiscListItemResponse {\n"); - sb.append(" rents: ").append(toIndentedString(rents)).append("\n"); - sb.append(" royalties: ").append(toIndentedString(royalties)).append("\n"); - sb.append(" otherIncome: ").append(toIndentedString(otherIncome)).append("\n"); - sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); - sb.append(" fishingBoatProceeds: ").append(toIndentedString(fishingBoatProceeds)).append("\n"); - sb.append(" medicalAndHealthCarePayments: ").append(toIndentedString(medicalAndHealthCarePayments)).append("\n"); - sb.append(" substitutePayments: ").append(toIndentedString(substitutePayments)).append("\n"); - sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); - sb.append(" cropInsuranceProceeds: ").append(toIndentedString(cropInsuranceProceeds)).append("\n"); - sb.append(" excessGoldenParachutePayments: ").append(toIndentedString(excessGoldenParachutePayments)).append("\n"); - sb.append(" grossProceedsPaidToAttorney: ").append(toIndentedString(grossProceedsPaidToAttorney)).append("\n"); - sb.append(" fishPurchasedForResale: ").append(toIndentedString(fishPurchasedForResale)).append("\n"); - sb.append(" section409ADeferrals: ").append(toIndentedString(section409ADeferrals)).append("\n"); - sb.append(" nonqualifiedDeferredCompensation: ").append(toIndentedString(nonqualifiedDeferredCompensation)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("recipientName"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("validationErrors"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("issuerId"); - openapiRequiredFields.add("federalEfile"); - openapiRequiredFields.add("stateEfile"); - openapiRequiredFields.add("postalMail"); - openapiRequiredFields.add("tinMatch"); - openapiRequiredFields.add("addressVerification"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099MiscListItemResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099MiscListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099MiscListItemResponse is not found in the empty JSON string", Form1099MiscListItemResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099MiscListItemResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099MiscListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099MiscListItemResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099MiscListItemResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099MiscListItemResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscListItemResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099MiscListItemResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099MiscListItemResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099MiscListItemResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099MiscListItemResponse - * @throws IOException if the JSON string is invalid with respect to Form1099MiscListItemResponse - */ - public static Form1099MiscListItemResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099MiscListItemResponse.class); - } - - /** - * Convert an instance of Form1099MiscListItemResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscRequest.java deleted file mode 100644 index a5020ca..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscRequest.java +++ /dev/null @@ -1,1407 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099MiscRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099MiscRequest { - public static final String SERIALIZED_NAME_RENTS = "rents"; - @SerializedName(SERIALIZED_NAME_RENTS) - private Double rents; - - public static final String SERIALIZED_NAME_ROYALTIES = "royalties"; - @SerializedName(SERIALIZED_NAME_ROYALTIES) - private Double royalties; - - public static final String SERIALIZED_NAME_OTHER_INCOME = "otherIncome"; - @SerializedName(SERIALIZED_NAME_OTHER_INCOME) - private Double otherIncome; - - public static final String SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD = "fedIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD) - private Double fedIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_FISHING_BOAT_PROCEEDS = "fishingBoatProceeds"; - @SerializedName(SERIALIZED_NAME_FISHING_BOAT_PROCEEDS) - private Double fishingBoatProceeds; - - public static final String SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE_PAYMENTS = "medicalAndHealthCarePayments"; - @SerializedName(SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE_PAYMENTS) - private Double medicalAndHealthCarePayments; - - public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; - @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) - private Boolean directSalesIndicator; - - public static final String SERIALIZED_NAME_SUBSTITUTE_PAYMENTS = "substitutePayments"; - @SerializedName(SERIALIZED_NAME_SUBSTITUTE_PAYMENTS) - private Double substitutePayments; - - public static final String SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS = "cropInsuranceProceeds"; - @SerializedName(SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS) - private Double cropInsuranceProceeds; - - public static final String SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY = "grossProceedsPaidToAttorney"; - @SerializedName(SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY) - private Double grossProceedsPaidToAttorney; - - public static final String SERIALIZED_NAME_FISH_PURCHASED_FOR_RESALE = "fishPurchasedForResale"; - @SerializedName(SERIALIZED_NAME_FISH_PURCHASED_FOR_RESALE) - private Double fishPurchasedForResale; - - public static final String SERIALIZED_NAME_SECTION409_A_DEFERRALS = "section409ADeferrals"; - @SerializedName(SERIALIZED_NAME_SECTION409_A_DEFERRALS) - private Double section409ADeferrals; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS = "excessGoldenParachutePayments"; - @SerializedName(SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS) - private Double excessGoldenParachutePayments; - - public static final String SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION = "nonqualifiedDeferredCompensation"; - @SerializedName(SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION) - private Double nonqualifiedDeferredCompensation; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099MiscRequest() { - } - - public Form1099MiscRequest rents(Double rents) { - this.rents = rents; - return this; - } - - /** - * Rents - * @return rents - */ - @javax.annotation.Nullable - public Double getRents() { - return rents; - } - - public void setRents(Double rents) { - this.rents = rents; - } - - - public Form1099MiscRequest royalties(Double royalties) { - this.royalties = royalties; - return this; - } - - /** - * Royalties - * @return royalties - */ - @javax.annotation.Nullable - public Double getRoyalties() { - return royalties; - } - - public void setRoyalties(Double royalties) { - this.royalties = royalties; - } - - - public Form1099MiscRequest otherIncome(Double otherIncome) { - this.otherIncome = otherIncome; - return this; - } - - /** - * Other income - * @return otherIncome - */ - @javax.annotation.Nullable - public Double getOtherIncome() { - return otherIncome; - } - - public void setOtherIncome(Double otherIncome) { - this.otherIncome = otherIncome; - } - - - public Form1099MiscRequest fedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return fedIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFedIncomeTaxWithheld() { - return fedIncomeTaxWithheld; - } - - public void setFedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; - } - - - public Form1099MiscRequest fishingBoatProceeds(Double fishingBoatProceeds) { - this.fishingBoatProceeds = fishingBoatProceeds; - return this; - } - - /** - * Fishing boat proceeds - * @return fishingBoatProceeds - */ - @javax.annotation.Nullable - public Double getFishingBoatProceeds() { - return fishingBoatProceeds; - } - - public void setFishingBoatProceeds(Double fishingBoatProceeds) { - this.fishingBoatProceeds = fishingBoatProceeds; - } - - - public Form1099MiscRequest medicalAndHealthCarePayments(Double medicalAndHealthCarePayments) { - this.medicalAndHealthCarePayments = medicalAndHealthCarePayments; - return this; - } - - /** - * Medical and health care payments - * @return medicalAndHealthCarePayments - */ - @javax.annotation.Nullable - public Double getMedicalAndHealthCarePayments() { - return medicalAndHealthCarePayments; - } - - public void setMedicalAndHealthCarePayments(Double medicalAndHealthCarePayments) { - this.medicalAndHealthCarePayments = medicalAndHealthCarePayments; - } - - - public Form1099MiscRequest directSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - return this; - } - - /** - * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * @return directSalesIndicator - */ - @javax.annotation.Nullable - public Boolean getDirectSalesIndicator() { - return directSalesIndicator; - } - - public void setDirectSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - } - - - public Form1099MiscRequest substitutePayments(Double substitutePayments) { - this.substitutePayments = substitutePayments; - return this; - } - - /** - * Substitute payments in lieu of dividends or interest - * @return substitutePayments - */ - @javax.annotation.Nullable - public Double getSubstitutePayments() { - return substitutePayments; - } - - public void setSubstitutePayments(Double substitutePayments) { - this.substitutePayments = substitutePayments; - } - - - public Form1099MiscRequest cropInsuranceProceeds(Double cropInsuranceProceeds) { - this.cropInsuranceProceeds = cropInsuranceProceeds; - return this; - } - - /** - * Crop insurance proceeds - * @return cropInsuranceProceeds - */ - @javax.annotation.Nullable - public Double getCropInsuranceProceeds() { - return cropInsuranceProceeds; - } - - public void setCropInsuranceProceeds(Double cropInsuranceProceeds) { - this.cropInsuranceProceeds = cropInsuranceProceeds; - } - - - public Form1099MiscRequest grossProceedsPaidToAttorney(Double grossProceedsPaidToAttorney) { - this.grossProceedsPaidToAttorney = grossProceedsPaidToAttorney; - return this; - } - - /** - * Gross proceeds paid to an attorney - * @return grossProceedsPaidToAttorney - */ - @javax.annotation.Nullable - public Double getGrossProceedsPaidToAttorney() { - return grossProceedsPaidToAttorney; - } - - public void setGrossProceedsPaidToAttorney(Double grossProceedsPaidToAttorney) { - this.grossProceedsPaidToAttorney = grossProceedsPaidToAttorney; - } - - - public Form1099MiscRequest fishPurchasedForResale(Double fishPurchasedForResale) { - this.fishPurchasedForResale = fishPurchasedForResale; - return this; - } - - /** - * Fish purchased for resale - * @return fishPurchasedForResale - */ - @javax.annotation.Nullable - public Double getFishPurchasedForResale() { - return fishPurchasedForResale; - } - - public void setFishPurchasedForResale(Double fishPurchasedForResale) { - this.fishPurchasedForResale = fishPurchasedForResale; - } - - - public Form1099MiscRequest section409ADeferrals(Double section409ADeferrals) { - this.section409ADeferrals = section409ADeferrals; - return this; - } - - /** - * Section 409A deferrals - * @return section409ADeferrals - */ - @javax.annotation.Nullable - public Double getSection409ADeferrals() { - return section409ADeferrals; - } - - public void setSection409ADeferrals(Double section409ADeferrals) { - this.section409ADeferrals = section409ADeferrals; - } - - - public Form1099MiscRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099MiscRequest excessGoldenParachutePayments(Double excessGoldenParachutePayments) { - this.excessGoldenParachutePayments = excessGoldenParachutePayments; - return this; - } - - /** - * (Legacy field) Excess golden parachute payments - * @return excessGoldenParachutePayments - */ - @javax.annotation.Nullable - public Double getExcessGoldenParachutePayments() { - return excessGoldenParachutePayments; - } - - public void setExcessGoldenParachutePayments(Double excessGoldenParachutePayments) { - this.excessGoldenParachutePayments = excessGoldenParachutePayments; - } - - - public Form1099MiscRequest nonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { - this.nonqualifiedDeferredCompensation = nonqualifiedDeferredCompensation; - return this; - } - - /** - * Nonqualified deferred compensation - * @return nonqualifiedDeferredCompensation - */ - @javax.annotation.Nullable - public Double getNonqualifiedDeferredCompensation() { - return nonqualifiedDeferredCompensation; - } - - public void setNonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { - this.nonqualifiedDeferredCompensation = nonqualifiedDeferredCompensation; - } - - - public Form1099MiscRequest type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Form1099MiscRequest issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099MiscRequest referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099MiscRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099MiscRequest recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099MiscRequest tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099MiscRequest recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099MiscRequest address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099MiscRequest address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099MiscRequest city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099MiscRequest state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099MiscRequest zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099MiscRequest email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099MiscRequest accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099MiscRequest officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099MiscRequest nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099MiscRequest countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099MiscRequest federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099MiscRequest postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099MiscRequest stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099MiscRequest tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099MiscRequest noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099MiscRequest secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099MiscRequest addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099MiscRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099MiscRequest form1099MiscRequest = (Form1099MiscRequest) o; - return Objects.equals(this.rents, form1099MiscRequest.rents) && - Objects.equals(this.royalties, form1099MiscRequest.royalties) && - Objects.equals(this.otherIncome, form1099MiscRequest.otherIncome) && - Objects.equals(this.fedIncomeTaxWithheld, form1099MiscRequest.fedIncomeTaxWithheld) && - Objects.equals(this.fishingBoatProceeds, form1099MiscRequest.fishingBoatProceeds) && - Objects.equals(this.medicalAndHealthCarePayments, form1099MiscRequest.medicalAndHealthCarePayments) && - Objects.equals(this.directSalesIndicator, form1099MiscRequest.directSalesIndicator) && - Objects.equals(this.substitutePayments, form1099MiscRequest.substitutePayments) && - Objects.equals(this.cropInsuranceProceeds, form1099MiscRequest.cropInsuranceProceeds) && - Objects.equals(this.grossProceedsPaidToAttorney, form1099MiscRequest.grossProceedsPaidToAttorney) && - Objects.equals(this.fishPurchasedForResale, form1099MiscRequest.fishPurchasedForResale) && - Objects.equals(this.section409ADeferrals, form1099MiscRequest.section409ADeferrals) && - Objects.equals(this.fatcaFilingRequirement, form1099MiscRequest.fatcaFilingRequirement) && - Objects.equals(this.excessGoldenParachutePayments, form1099MiscRequest.excessGoldenParachutePayments) && - Objects.equals(this.nonqualifiedDeferredCompensation, form1099MiscRequest.nonqualifiedDeferredCompensation) && - Objects.equals(this.type, form1099MiscRequest.type) && - Objects.equals(this.issuerId, form1099MiscRequest.issuerId) && - Objects.equals(this.referenceId, form1099MiscRequest.referenceId) && - Objects.equals(this.recipientTin, form1099MiscRequest.recipientTin) && - Objects.equals(this.recipientName, form1099MiscRequest.recipientName) && - Objects.equals(this.tinType, form1099MiscRequest.tinType) && - Objects.equals(this.recipientSecondName, form1099MiscRequest.recipientSecondName) && - Objects.equals(this.address, form1099MiscRequest.address) && - Objects.equals(this.address2, form1099MiscRequest.address2) && - Objects.equals(this.city, form1099MiscRequest.city) && - Objects.equals(this.state, form1099MiscRequest.state) && - Objects.equals(this.zip, form1099MiscRequest.zip) && - Objects.equals(this.email, form1099MiscRequest.email) && - Objects.equals(this.accountNumber, form1099MiscRequest.accountNumber) && - Objects.equals(this.officeCode, form1099MiscRequest.officeCode) && - Objects.equals(this.nonUsProvince, form1099MiscRequest.nonUsProvince) && - Objects.equals(this.countryCode, form1099MiscRequest.countryCode) && - Objects.equals(this.federalEFile, form1099MiscRequest.federalEFile) && - Objects.equals(this.postalMail, form1099MiscRequest.postalMail) && - Objects.equals(this.stateEFile, form1099MiscRequest.stateEFile) && - Objects.equals(this.tinMatch, form1099MiscRequest.tinMatch) && - Objects.equals(this.noTin, form1099MiscRequest.noTin) && - Objects.equals(this.secondTinNotice, form1099MiscRequest.secondTinNotice) && - Objects.equals(this.addressVerification, form1099MiscRequest.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099MiscRequest.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalAndHealthCarePayments, directSalesIndicator, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, fatcaFilingRequirement, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099MiscRequest {\n"); - sb.append(" rents: ").append(toIndentedString(rents)).append("\n"); - sb.append(" royalties: ").append(toIndentedString(royalties)).append("\n"); - sb.append(" otherIncome: ").append(toIndentedString(otherIncome)).append("\n"); - sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); - sb.append(" fishingBoatProceeds: ").append(toIndentedString(fishingBoatProceeds)).append("\n"); - sb.append(" medicalAndHealthCarePayments: ").append(toIndentedString(medicalAndHealthCarePayments)).append("\n"); - sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); - sb.append(" substitutePayments: ").append(toIndentedString(substitutePayments)).append("\n"); - sb.append(" cropInsuranceProceeds: ").append(toIndentedString(cropInsuranceProceeds)).append("\n"); - sb.append(" grossProceedsPaidToAttorney: ").append(toIndentedString(grossProceedsPaidToAttorney)).append("\n"); - sb.append(" fishPurchasedForResale: ").append(toIndentedString(fishPurchasedForResale)).append("\n"); - sb.append(" section409ADeferrals: ").append(toIndentedString(section409ADeferrals)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" excessGoldenParachutePayments: ").append(toIndentedString(excessGoldenParachutePayments)).append("\n"); - sb.append(" nonqualifiedDeferredCompensation: ").append(toIndentedString(nonqualifiedDeferredCompensation)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099MiscRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099MiscRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099MiscRequest is not found in the empty JSON string", Form1099MiscRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099MiscRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099MiscRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099MiscRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099MiscRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099MiscRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099MiscRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099MiscRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099MiscRequest - * @throws IOException if the JSON string is invalid with respect to Form1099MiscRequest - */ - public static Form1099MiscRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099MiscRequest.class); - } - - /** - * Convert an instance of Form1099MiscRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscResponse.java deleted file mode 100644 index 12c2960..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscResponse.java +++ /dev/null @@ -1,1822 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099MiscResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099MiscResponse { - public static final String SERIALIZED_NAME_RENTS = "rents"; - @SerializedName(SERIALIZED_NAME_RENTS) - private Double rents; - - public static final String SERIALIZED_NAME_ROYALTIES = "royalties"; - @SerializedName(SERIALIZED_NAME_ROYALTIES) - private Double royalties; - - public static final String SERIALIZED_NAME_OTHER_INCOME = "otherIncome"; - @SerializedName(SERIALIZED_NAME_OTHER_INCOME) - private Double otherIncome; - - public static final String SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD = "fedIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD) - private Double fedIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_FISHING_BOAT_PROCEEDS = "fishingBoatProceeds"; - @SerializedName(SERIALIZED_NAME_FISHING_BOAT_PROCEEDS) - private Double fishingBoatProceeds; - - public static final String SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE_PAYMENTS = "medicalAndHealthCarePayments"; - @SerializedName(SERIALIZED_NAME_MEDICAL_AND_HEALTH_CARE_PAYMENTS) - private Double medicalAndHealthCarePayments; - - public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; - @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) - private Boolean directSalesIndicator; - - public static final String SERIALIZED_NAME_SUBSTITUTE_PAYMENTS = "substitutePayments"; - @SerializedName(SERIALIZED_NAME_SUBSTITUTE_PAYMENTS) - private Double substitutePayments; - - public static final String SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS = "cropInsuranceProceeds"; - @SerializedName(SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS) - private Double cropInsuranceProceeds; - - public static final String SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY = "grossProceedsPaidToAttorney"; - @SerializedName(SERIALIZED_NAME_GROSS_PROCEEDS_PAID_TO_ATTORNEY) - private Double grossProceedsPaidToAttorney; - - public static final String SERIALIZED_NAME_FISH_PURCHASED_FOR_RESALE = "fishPurchasedForResale"; - @SerializedName(SERIALIZED_NAME_FISH_PURCHASED_FOR_RESALE) - private Double fishPurchasedForResale; - - public static final String SERIALIZED_NAME_SECTION409_A_DEFERRALS = "section409ADeferrals"; - @SerializedName(SERIALIZED_NAME_SECTION409_A_DEFERRALS) - private Double section409ADeferrals; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS = "excessGoldenParachutePayments"; - @SerializedName(SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS) - private Double excessGoldenParachutePayments; - - public static final String SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION = "nonqualifiedDeferredCompensation"; - @SerializedName(SERIALIZED_NAME_NONQUALIFIED_DEFERRED_COMPENSATION) - private Double nonqualifiedDeferredCompensation; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - /** - * Gets or Sets tinType - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public Form1099MiscResponse() { - } - - public Form1099MiscResponse( - TypeEnum type - ) { - this(); - this.type = type; - } - - public Form1099MiscResponse rents(Double rents) { - this.rents = rents; - return this; - } - - /** - * Get rents - * @return rents - */ - @javax.annotation.Nullable - public Double getRents() { - return rents; - } - - public void setRents(Double rents) { - this.rents = rents; - } - - - public Form1099MiscResponse royalties(Double royalties) { - this.royalties = royalties; - return this; - } - - /** - * Get royalties - * @return royalties - */ - @javax.annotation.Nullable - public Double getRoyalties() { - return royalties; - } - - public void setRoyalties(Double royalties) { - this.royalties = royalties; - } - - - public Form1099MiscResponse otherIncome(Double otherIncome) { - this.otherIncome = otherIncome; - return this; - } - - /** - * Get otherIncome - * @return otherIncome - */ - @javax.annotation.Nullable - public Double getOtherIncome() { - return otherIncome; - } - - public void setOtherIncome(Double otherIncome) { - this.otherIncome = otherIncome; - } - - - public Form1099MiscResponse fedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; - return this; - } - - /** - * Get fedIncomeTaxWithheld - * @return fedIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFedIncomeTaxWithheld() { - return fedIncomeTaxWithheld; - } - - public void setFedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; - } - - - public Form1099MiscResponse fishingBoatProceeds(Double fishingBoatProceeds) { - this.fishingBoatProceeds = fishingBoatProceeds; - return this; - } - - /** - * Get fishingBoatProceeds - * @return fishingBoatProceeds - */ - @javax.annotation.Nullable - public Double getFishingBoatProceeds() { - return fishingBoatProceeds; - } - - public void setFishingBoatProceeds(Double fishingBoatProceeds) { - this.fishingBoatProceeds = fishingBoatProceeds; - } - - - public Form1099MiscResponse medicalAndHealthCarePayments(Double medicalAndHealthCarePayments) { - this.medicalAndHealthCarePayments = medicalAndHealthCarePayments; - return this; - } - - /** - * Get medicalAndHealthCarePayments - * @return medicalAndHealthCarePayments - */ - @javax.annotation.Nullable - public Double getMedicalAndHealthCarePayments() { - return medicalAndHealthCarePayments; - } - - public void setMedicalAndHealthCarePayments(Double medicalAndHealthCarePayments) { - this.medicalAndHealthCarePayments = medicalAndHealthCarePayments; - } - - - public Form1099MiscResponse directSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - return this; - } - - /** - * Get directSalesIndicator - * @return directSalesIndicator - */ - @javax.annotation.Nullable - public Boolean getDirectSalesIndicator() { - return directSalesIndicator; - } - - public void setDirectSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - } - - - public Form1099MiscResponse substitutePayments(Double substitutePayments) { - this.substitutePayments = substitutePayments; - return this; - } - - /** - * Get substitutePayments - * @return substitutePayments - */ - @javax.annotation.Nullable - public Double getSubstitutePayments() { - return substitutePayments; - } - - public void setSubstitutePayments(Double substitutePayments) { - this.substitutePayments = substitutePayments; - } - - - public Form1099MiscResponse cropInsuranceProceeds(Double cropInsuranceProceeds) { - this.cropInsuranceProceeds = cropInsuranceProceeds; - return this; - } - - /** - * Get cropInsuranceProceeds - * @return cropInsuranceProceeds - */ - @javax.annotation.Nullable - public Double getCropInsuranceProceeds() { - return cropInsuranceProceeds; - } - - public void setCropInsuranceProceeds(Double cropInsuranceProceeds) { - this.cropInsuranceProceeds = cropInsuranceProceeds; - } - - - public Form1099MiscResponse grossProceedsPaidToAttorney(Double grossProceedsPaidToAttorney) { - this.grossProceedsPaidToAttorney = grossProceedsPaidToAttorney; - return this; - } - - /** - * Get grossProceedsPaidToAttorney - * @return grossProceedsPaidToAttorney - */ - @javax.annotation.Nullable - public Double getGrossProceedsPaidToAttorney() { - return grossProceedsPaidToAttorney; - } - - public void setGrossProceedsPaidToAttorney(Double grossProceedsPaidToAttorney) { - this.grossProceedsPaidToAttorney = grossProceedsPaidToAttorney; - } - - - public Form1099MiscResponse fishPurchasedForResale(Double fishPurchasedForResale) { - this.fishPurchasedForResale = fishPurchasedForResale; - return this; - } - - /** - * Get fishPurchasedForResale - * @return fishPurchasedForResale - */ - @javax.annotation.Nullable - public Double getFishPurchasedForResale() { - return fishPurchasedForResale; - } - - public void setFishPurchasedForResale(Double fishPurchasedForResale) { - this.fishPurchasedForResale = fishPurchasedForResale; - } - - - public Form1099MiscResponse section409ADeferrals(Double section409ADeferrals) { - this.section409ADeferrals = section409ADeferrals; - return this; - } - - /** - * Get section409ADeferrals - * @return section409ADeferrals - */ - @javax.annotation.Nullable - public Double getSection409ADeferrals() { - return section409ADeferrals; - } - - public void setSection409ADeferrals(Double section409ADeferrals) { - this.section409ADeferrals = section409ADeferrals; - } - - - public Form1099MiscResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Get fatcaFilingRequirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099MiscResponse excessGoldenParachutePayments(Double excessGoldenParachutePayments) { - this.excessGoldenParachutePayments = excessGoldenParachutePayments; - return this; - } - - /** - * Get excessGoldenParachutePayments - * @return excessGoldenParachutePayments - */ - @javax.annotation.Nullable - public Double getExcessGoldenParachutePayments() { - return excessGoldenParachutePayments; - } - - public void setExcessGoldenParachutePayments(Double excessGoldenParachutePayments) { - this.excessGoldenParachutePayments = excessGoldenParachutePayments; - } - - - public Form1099MiscResponse nonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { - this.nonqualifiedDeferredCompensation = nonqualifiedDeferredCompensation; - return this; - } - - /** - * Get nonqualifiedDeferredCompensation - * @return nonqualifiedDeferredCompensation - */ - @javax.annotation.Nullable - public Double getNonqualifiedDeferredCompensation() { - return nonqualifiedDeferredCompensation; - } - - public void setNonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompensation) { - this.nonqualifiedDeferredCompensation = nonqualifiedDeferredCompensation; - } - - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - - public Form1099MiscResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Form1099MiscResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099MiscResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - public Form1099MiscResponse tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Get tinType - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099MiscResponse id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public Form1099MiscResponse issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Get issuerId - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099MiscResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Get issuerReferenceId - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099MiscResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Get issuerTin - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099MiscResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Get taxYear - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099MiscResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099MiscResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get recipientName - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099MiscResponse recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Get recipientTin - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099MiscResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Get recipientSecondName - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099MiscResponse address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099MiscResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Get address2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099MiscResponse city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099MiscResponse state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099MiscResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099MiscResponse email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099MiscResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099MiscResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Get officeCode - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099MiscResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Get nonUsProvince - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099MiscResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099MiscResponse federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Get federalEFile - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099MiscResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Get postalMail - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099MiscResponse stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Get stateEFile - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099MiscResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Get tinMatch - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099MiscResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Get noTin - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099MiscResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Get secondTinNotice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099MiscResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Get addressVerification - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099MiscResponse federalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - return this; - } - - /** - * Get federalEfileStatus - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - public void setFederalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - } - - - public Form1099MiscResponse eDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - return this; - } - - /** - * Get eDeliveryStatus - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - } - - - public Form1099MiscResponse stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099MiscResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); - return this; - } - - /** - * Get stateEfileStatus - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - } - - - public Form1099MiscResponse postalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - return this; - } - - /** - * Get postalMailStatus - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - public void setPostalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - } - - - public Form1099MiscResponse tinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - return this; - } - - /** - * Get tinMatchStatus - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - public void setTinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - } - - - public Form1099MiscResponse addressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - return this; - } - - /** - * Get addressVerificationStatus - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - } - - - public Form1099MiscResponse validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1099MiscResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } - - /** - * Get validationErrors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099MiscResponse form1099MiscResponse = (Form1099MiscResponse) o; - return Objects.equals(this.rents, form1099MiscResponse.rents) && - Objects.equals(this.royalties, form1099MiscResponse.royalties) && - Objects.equals(this.otherIncome, form1099MiscResponse.otherIncome) && - Objects.equals(this.fedIncomeTaxWithheld, form1099MiscResponse.fedIncomeTaxWithheld) && - Objects.equals(this.fishingBoatProceeds, form1099MiscResponse.fishingBoatProceeds) && - Objects.equals(this.medicalAndHealthCarePayments, form1099MiscResponse.medicalAndHealthCarePayments) && - Objects.equals(this.directSalesIndicator, form1099MiscResponse.directSalesIndicator) && - Objects.equals(this.substitutePayments, form1099MiscResponse.substitutePayments) && - Objects.equals(this.cropInsuranceProceeds, form1099MiscResponse.cropInsuranceProceeds) && - Objects.equals(this.grossProceedsPaidToAttorney, form1099MiscResponse.grossProceedsPaidToAttorney) && - Objects.equals(this.fishPurchasedForResale, form1099MiscResponse.fishPurchasedForResale) && - Objects.equals(this.section409ADeferrals, form1099MiscResponse.section409ADeferrals) && - Objects.equals(this.fatcaFilingRequirement, form1099MiscResponse.fatcaFilingRequirement) && - Objects.equals(this.excessGoldenParachutePayments, form1099MiscResponse.excessGoldenParachutePayments) && - Objects.equals(this.nonqualifiedDeferredCompensation, form1099MiscResponse.nonqualifiedDeferredCompensation) && - Objects.equals(this.type, form1099MiscResponse.type) && - Objects.equals(this.createdAt, form1099MiscResponse.createdAt) && - Objects.equals(this.updatedAt, form1099MiscResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099MiscResponse.stateAndLocalWithholding) && - Objects.equals(this.tinType, form1099MiscResponse.tinType) && - Objects.equals(this.id, form1099MiscResponse.id) && - Objects.equals(this.issuerId, form1099MiscResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099MiscResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099MiscResponse.issuerTin) && - Objects.equals(this.taxYear, form1099MiscResponse.taxYear) && - Objects.equals(this.referenceId, form1099MiscResponse.referenceId) && - Objects.equals(this.recipientName, form1099MiscResponse.recipientName) && - Objects.equals(this.recipientTin, form1099MiscResponse.recipientTin) && - Objects.equals(this.recipientSecondName, form1099MiscResponse.recipientSecondName) && - Objects.equals(this.address, form1099MiscResponse.address) && - Objects.equals(this.address2, form1099MiscResponse.address2) && - Objects.equals(this.city, form1099MiscResponse.city) && - Objects.equals(this.state, form1099MiscResponse.state) && - Objects.equals(this.zip, form1099MiscResponse.zip) && - Objects.equals(this.email, form1099MiscResponse.email) && - Objects.equals(this.accountNumber, form1099MiscResponse.accountNumber) && - Objects.equals(this.officeCode, form1099MiscResponse.officeCode) && - Objects.equals(this.nonUsProvince, form1099MiscResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099MiscResponse.countryCode) && - Objects.equals(this.federalEFile, form1099MiscResponse.federalEFile) && - Objects.equals(this.postalMail, form1099MiscResponse.postalMail) && - Objects.equals(this.stateEFile, form1099MiscResponse.stateEFile) && - Objects.equals(this.tinMatch, form1099MiscResponse.tinMatch) && - Objects.equals(this.noTin, form1099MiscResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099MiscResponse.secondTinNotice) && - Objects.equals(this.addressVerification, form1099MiscResponse.addressVerification) && - Objects.equals(this.federalEfileStatus, form1099MiscResponse.federalEfileStatus) && - Objects.equals(this.eDeliveryStatus, form1099MiscResponse.eDeliveryStatus) && - Objects.equals(this.stateEfileStatus, form1099MiscResponse.stateEfileStatus) && - Objects.equals(this.postalMailStatus, form1099MiscResponse.postalMailStatus) && - Objects.equals(this.tinMatchStatus, form1099MiscResponse.tinMatchStatus) && - Objects.equals(this.addressVerificationStatus, form1099MiscResponse.addressVerificationStatus) && - Objects.equals(this.validationErrors, form1099MiscResponse.validationErrors); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalAndHealthCarePayments, directSalesIndicator, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, fatcaFilingRequirement, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099MiscResponse {\n"); - sb.append(" rents: ").append(toIndentedString(rents)).append("\n"); - sb.append(" royalties: ").append(toIndentedString(royalties)).append("\n"); - sb.append(" otherIncome: ").append(toIndentedString(otherIncome)).append("\n"); - sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); - sb.append(" fishingBoatProceeds: ").append(toIndentedString(fishingBoatProceeds)).append("\n"); - sb.append(" medicalAndHealthCarePayments: ").append(toIndentedString(medicalAndHealthCarePayments)).append("\n"); - sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); - sb.append(" substitutePayments: ").append(toIndentedString(substitutePayments)).append("\n"); - sb.append(" cropInsuranceProceeds: ").append(toIndentedString(cropInsuranceProceeds)).append("\n"); - sb.append(" grossProceedsPaidToAttorney: ").append(toIndentedString(grossProceedsPaidToAttorney)).append("\n"); - sb.append(" fishPurchasedForResale: ").append(toIndentedString(fishPurchasedForResale)).append("\n"); - sb.append(" section409ADeferrals: ").append(toIndentedString(section409ADeferrals)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" excessGoldenParachutePayments: ").append(toIndentedString(excessGoldenParachutePayments)).append("\n"); - sb.append(" nonqualifiedDeferredCompensation: ").append(toIndentedString(nonqualifiedDeferredCompensation)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("tinType"); - openapiFields.add("id"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("referenceId"); - openapiFields.add("recipientName"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("addressVerification"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("validationErrors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099MiscResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099MiscResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099MiscResponse is not found in the empty JSON string", Form1099MiscResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099MiscResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099MiscResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099MiscResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099MiscResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099MiscResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099MiscResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099MiscResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099MiscResponse - * @throws IOException if the JSON string is invalid with respect to Form1099MiscResponse - */ - public static Form1099MiscResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099MiscResponse.class); - } - - /** - * Convert an instance of Form1099MiscResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java index 08f576d..03f1c2e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java @@ -30,6 +30,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -69,25 +70,91 @@ public class Form1099Nec { @SerializedName(SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION) private Double nonemployeeCompensation; + public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; + @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) + private Boolean directSalesIndicator; + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) private Double federalIncomeTaxWithheld; - public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; - @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) - private Boolean directSalesIndicator; + /** + * Form type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1099_NEC("1099-NEC"), + + _1099_MISC("1099-MISC"), + + _1099_DIV("1099-DIV"), + + _1099_R("1099-R"), + + _1099_K("1099-K"), + + _1095_B("1095-B"), + + _1042_S("1042-S"), + + _1095_C("1095-C"), + + _1099_INT("1099-INT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private String type; + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; + private String issuerId; public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) @@ -101,81 +168,79 @@ public class Form1099Nec { @SerializedName(SERIALIZED_NAME_TAX_YEAR) private Integer taxYear; - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private Form1099StatusDetail postalMailStatus; + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; + /** + * Type of TIN (Tax ID Number) + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EMPTY("Empty"), + + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"); + + private String value; + + TinTypeEnum(String value) { + this.value = value; + } - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private Form1099StatusDetail tinMatchStatus; + public String getValue() { + return value; + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; + @Override + public String toString() { + return String.valueOf(value); + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private Form1099StatusDetail addressVerificationStatus; + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private Form1099StatusDetail eDeliveryStatus; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; + private TinTypeEnum tinType; public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) @@ -201,6 +266,18 @@ public class Form1099Nec { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -209,13 +286,65 @@ public class Form1099Nec { @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) private String countryCode; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) @@ -229,20 +358,41 @@ public class Form1099Nec { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholding stateAndLocalWithholding; - public Form1099Nec() { } + public Form1099Nec( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + public Form1099Nec nonemployeeCompensation(Double nonemployeeCompensation) { this.nonemployeeCompensation = nonemployeeCompensation; return this; } /** - * Get nonemployeeCompensation + * Nonemployee compensation * @return nonemployeeCompensation */ @javax.annotation.Nullable @@ -255,32 +405,13 @@ public void setNonemployeeCompensation(Double nonemployeeCompensation) { } - public Form1099Nec federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Get federalIncomeTaxWithheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - public Form1099Nec directSalesIndicator(Boolean directSalesIndicator) { this.directSalesIndicator = directSalesIndicator; return this; } /** - * Get directSalesIndicator + * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale * @return directSalesIndicator */ @javax.annotation.Nullable @@ -293,59 +424,70 @@ public void setDirectSalesIndicator(Boolean directSalesIndicator) { } - public Form1099Nec id(String id) { - this.id = id; + public Form1099Nec federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; return this; } /** - * Get id - * @return id + * Federal income tax withheld + * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable - public String getId() { - return id; + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; } - public void setId(String id) { - this.id = id; + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; } - public Form1099Nec type(String type) { + public Form1099Nec type(TypeEnum type) { this.type = type; return this; } /** - * Get type + * Form type * @return type */ - @javax.annotation.Nullable - public String getType() { + @javax.annotation.Nonnull + public TypeEnum getType() { return type; } - public void setType(String type) { + public void setType(TypeEnum type) { this.type = type; } - public Form1099Nec issuerId(Integer issuerId) { + /** + * Form ID. Unique identifier set when the record is created. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + + public Form1099Nec issuerId(String issuerId) { this.issuerId = issuerId; return this; } /** - * Get issuerId + * Issuer ID - only required when creating forms * @return issuerId */ @javax.annotation.Nullable - public Integer getIssuerId() { + public String getIssuerId() { return issuerId; } - public void setIssuerId(Integer issuerId) { + public void setIssuerId(String issuerId) { this.issuerId = issuerId; } @@ -356,7 +498,7 @@ public Form1099Nec issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID - only required when creating forms * @return issuerReferenceId */ @javax.annotation.Nullable @@ -375,7 +517,7 @@ public Form1099Nec issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN - readonly * @return issuerTin */ @javax.annotation.Nullable @@ -394,7 +536,7 @@ public Form1099Nec taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax Year - only required when creating forms * @return taxYear */ @javax.annotation.Nullable @@ -407,580 +549,530 @@ public void setTaxYear(Integer taxYear) { } - public Form1099Nec federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; + public Form1099Nec referenceId(String referenceId) { + this.referenceId = referenceId; return this; } /** - * Get federalEfile - * @return federalEfile + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId */ @javax.annotation.Nullable - public Boolean getFederalEfile() { - return federalEfile; + public String getReferenceId() { + return referenceId; } - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; } - public Form1099Nec federalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public Form1099Nec tin(String tin) { + this.tin = tin; return this; } /** - * Get federalEfileStatus - * @return federalEfileStatus + * Recipient's Federal Tax Identification Number (TIN). + * @return tin */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { - return federalEfileStatus; + public String getTin() { + return tin; } - public void setFederalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public void setTin(String tin) { + this.tin = tin; } - public Form1099Nec stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public Form1099Nec recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get stateEfile - * @return stateEfile + * Recipient name + * @return recipientName */ @javax.annotation.Nullable - public Boolean getStateEfile() { - return stateEfile; - } - - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public String getRecipientName() { + return recipientName; } - - public Form1099Nec stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } - public Form1099Nec addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); + + public Form1099Nec tinType(TinTypeEnum tinType) { + this.tinType = tinType; return this; } /** - * Get stateEfileStatus - * @return stateEfileStatus + * Type of TIN (Tax ID Number) + * @return tinType */ @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; + public TinTypeEnum getTinType() { + return tinType; } - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; } - public Form1099Nec postalMail(Boolean postalMail) { - this.postalMail = postalMail; + public Form1099Nec recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; return this; } /** - * Get postalMail - * @return postalMail + * Recipient second name + * @return recipientSecondName */ @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; + public String getRecipientSecondName() { + return recipientSecondName; } - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; } - public Form1099Nec postalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public Form1099Nec address(String address) { + this.address = address; return this; } /** - * Get postalMailStatus - * @return postalMailStatus + * Address. + * @return address */ @javax.annotation.Nullable - public Form1099StatusDetail getPostalMailStatus() { - return postalMailStatus; + public String getAddress() { + return address; } - public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public void setAddress(String address) { + this.address = address; } - public Form1099Nec tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public Form1099Nec address2(String address2) { + this.address2 = address2; return this; } /** - * Get tinMatch - * @return tinMatch + * Address line 2. + * @return address2 */ @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; + public String getAddress2() { + return address2; } - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public void setAddress2(String address2) { + this.address2 = address2; } - public Form1099Nec tinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public Form1099Nec city(String city) { + this.city = city; return this; } /** - * Get tinMatchStatus - * @return tinMatchStatus + * City. + * @return city */ @javax.annotation.Nullable - public Form1099StatusDetail getTinMatchStatus() { - return tinMatchStatus; + public String getCity() { + return city; } - public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public void setCity(String city) { + this.city = city; } - public Form1099Nec addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public Form1099Nec state(String state) { + this.state = state; return this; } /** - * Get addressVerification - * @return addressVerification + * Two-letter US state or Canadian province code (required for US/CA addresses). + * @return state */ @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; + public String getState() { + return state; } - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public void setState(String state) { + this.state = state; } - public Form1099Nec addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public Form1099Nec zip(String zip) { + this.zip = zip; return this; } /** - * Get addressVerificationStatus - * @return addressVerificationStatus + * ZIP/postal code. + * @return zip */ @javax.annotation.Nullable - public Form1099StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; + public String getZip() { + return zip; } - public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public void setZip(String zip) { + this.zip = zip; } - public Form1099Nec eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public Form1099Nec email(String email) { + this.email = email; return this; } /** - * Get eDeliveryStatus - * @return eDeliveryStatus + * Recipient's Contact email address. + * @return email */ @javax.annotation.Nullable - public Form1099StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; + public String getEmail() { + return email; } - public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public void setEmail(String email) { + this.email = email; } - public Form1099Nec referenceId(String referenceId) { - this.referenceId = referenceId; + public Form1099Nec accountNumber(String accountNumber) { + this.accountNumber = accountNumber; return this; } /** - * Get referenceId - * @return referenceId + * Account number + * @return accountNumber */ @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; + public String getAccountNumber() { + return accountNumber; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; } - public Form1099Nec email(String email) { - this.email = email; + public Form1099Nec officeCode(String officeCode) { + this.officeCode = officeCode; return this; } /** - * Get email - * @return email + * Office code + * @return officeCode */ @javax.annotation.Nullable - public String getEmail() { - return email; + public String getOfficeCode() { + return officeCode; } - public void setEmail(String email) { - this.email = email; + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; } - public Form1099Nec tinType(String tinType) { - this.tinType = tinType; + public Form1099Nec nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get tinType - * @return tinType + * Province or region for non-US/CA addresses. + * @return nonUsProvince */ @javax.annotation.Nullable - public String getTinType() { - return tinType; + public String getNonUsProvince() { + return nonUsProvince; } - public void setTinType(String tinType) { - this.tinType = tinType; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } - public Form1099Nec fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public Form1099Nec countryCode(String countryCode) { + this.countryCode = countryCode; return this; } /** - * Get fatcaFilingRequirement - * @return fatcaFilingRequirement + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode */ @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; + public String getCountryCode() { + return countryCode; } - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; } - public Form1099Nec tin(String tin) { - this.tin = tin; + public Form1099Nec federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; return this; } /** - * Get tin - * @return tin + * Date when federal e-filing should be scheduled for this form + * @return federalEfileDate */ @javax.annotation.Nullable - public String getTin() { - return tin; + public LocalDate getFederalEfileDate() { + return federalEfileDate; } - public void setTin(String tin) { - this.tin = tin; + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; } - public Form1099Nec noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099Nec postalMail(Boolean postalMail) { + this.postalMail = postalMail; return this; } /** - * Get noTin - * @return noTin + * Boolean indicating that postal mailing to the recipient should be scheduled for this form + * @return postalMail */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getPostalMail() { + return postalMail; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; } - public Form1099Nec secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public Form1099Nec stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; return this; } /** - * Get secondTinNotice - * @return secondTinNotice + * Date when state e-filing should be scheduled for this form + * @return stateEfileDate */ @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; + public LocalDate getStateEfileDate() { + return stateEfileDate; } - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; } - public Form1099Nec recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099Nec recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; return this; } /** - * Get recipientName - * @return recipientName + * Date when recipient e-delivery should be scheduled for this form + * @return recipientEdeliveryDate */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; } - public Form1099Nec recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public Form1099Nec tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; return this; } /** - * Get recipientSecondName - * @return recipientSecondName + * Boolean indicating that TIN Matching should be scheduled for this form + * @return tinMatch */ @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; + public Boolean getTinMatch() { + return tinMatch; } - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; } - public Form1099Nec address(String address) { - this.address = address; + public Form1099Nec noTin(Boolean noTin) { + this.noTin = noTin; return this; } /** - * Get address - * @return address + * No TIN indicator + * @return noTin */ @javax.annotation.Nullable - public String getAddress() { - return address; + public Boolean getNoTin() { + return noTin; } - public void setAddress(String address) { - this.address = address; + public void setNoTin(Boolean noTin) { + this.noTin = noTin; } - public Form1099Nec address2(String address2) { - this.address2 = address2; + public Form1099Nec addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * Get address2 - * @return address2 + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public String getAddress2() { - return address2; + public Boolean getAddressVerification() { + return addressVerification; } - public void setAddress2(String address2) { - this.address2 = address2; + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } - public Form1099Nec city(String city) { - this.city = city; + public Form1099Nec stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; return this; } /** - * Get city - * @return city + * State and local withholding information + * @return stateAndLocalWithholding */ @javax.annotation.Nullable - public String getCity() { - return city; + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; } - public void setCity(String city) { - this.city = city; + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; } - public Form1099Nec state(String state) { - this.state = state; + public Form1099Nec secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; return this; } /** - * Get state - * @return state + * Second TIN notice + * @return secondTinNotice */ @javax.annotation.Nullable - public String getState() { - return state; + public Boolean getSecondTinNotice() { + return secondTinNotice; } - public void setState(String state) { - this.state = state; + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; } - public Form1099Nec zip(String zip) { - this.zip = zip; - return this; - } - /** - * Get zip - * @return zip + * Federal e-file status + * @return federalEfileStatus */ @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; } - public Form1099Nec nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } /** - * Get nonUsProvince - * @return nonUsProvince + * State e-file status + * @return stateEfileStatus */ @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; + public List getStateEfileStatus() { + return stateEfileStatus; } - public Form1099Nec countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } /** - * Get countryCode - * @return countryCode + * Postal mail to recipient status + * @return postalMailStatus */ @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; } - public Form1099Nec accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } /** - * Get accountNumber - * @return accountNumber + * TIN Match status + * @return tinMatchStatus */ @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - public Form1099Nec officeCode(String officeCode) { - this.officeCode = officeCode; - return this; + /** + * Address verification status + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; } + + /** - * Get officeCode - * @return officeCode + * EDelivery status + * @return eDeliveryStatus */ @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; } - public Form1099Nec validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1099Nec addValidationErrorsItem(ValidationError validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } /** - * Get validationErrors + * Validation errors * @return validationErrors */ @javax.annotation.Nullable @@ -988,18 +1080,10 @@ public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - public Form1099Nec createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } /** - * Get createdAt + * Date time when the record was created. * @return createdAt */ @javax.annotation.Nullable @@ -1007,18 +1091,10 @@ public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public Form1099Nec updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } /** - * Get updatedAt + * Date time when the record was last updated. * @return updatedAt */ @javax.annotation.Nullable @@ -1026,28 +1102,6 @@ public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099Nec stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholding getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } @@ -1061,47 +1115,47 @@ public boolean equals(Object o) { } Form1099Nec form1099Nec = (Form1099Nec) o; return Objects.equals(this.nonemployeeCompensation, form1099Nec.nonemployeeCompensation) && - Objects.equals(this.federalIncomeTaxWithheld, form1099Nec.federalIncomeTaxWithheld) && Objects.equals(this.directSalesIndicator, form1099Nec.directSalesIndicator) && - Objects.equals(this.id, form1099Nec.id) && + Objects.equals(this.federalIncomeTaxWithheld, form1099Nec.federalIncomeTaxWithheld) && Objects.equals(this.type, form1099Nec.type) && + Objects.equals(this.id, form1099Nec.id) && Objects.equals(this.issuerId, form1099Nec.issuerId) && Objects.equals(this.issuerReferenceId, form1099Nec.issuerReferenceId) && Objects.equals(this.issuerTin, form1099Nec.issuerTin) && Objects.equals(this.taxYear, form1099Nec.taxYear) && - Objects.equals(this.federalEfile, form1099Nec.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099Nec.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099Nec.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099Nec.stateEfileStatus) && - Objects.equals(this.postalMail, form1099Nec.postalMail) && - Objects.equals(this.postalMailStatus, form1099Nec.postalMailStatus) && - Objects.equals(this.tinMatch, form1099Nec.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099Nec.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099Nec.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099Nec.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099Nec.eDeliveryStatus) && Objects.equals(this.referenceId, form1099Nec.referenceId) && - Objects.equals(this.email, form1099Nec.email) && - Objects.equals(this.tinType, form1099Nec.tinType) && - Objects.equals(this.fatcaFilingRequirement, form1099Nec.fatcaFilingRequirement) && Objects.equals(this.tin, form1099Nec.tin) && - Objects.equals(this.noTin, form1099Nec.noTin) && - Objects.equals(this.secondTinNotice, form1099Nec.secondTinNotice) && Objects.equals(this.recipientName, form1099Nec.recipientName) && + Objects.equals(this.tinType, form1099Nec.tinType) && Objects.equals(this.recipientSecondName, form1099Nec.recipientSecondName) && Objects.equals(this.address, form1099Nec.address) && Objects.equals(this.address2, form1099Nec.address2) && Objects.equals(this.city, form1099Nec.city) && Objects.equals(this.state, form1099Nec.state) && Objects.equals(this.zip, form1099Nec.zip) && - Objects.equals(this.nonUsProvince, form1099Nec.nonUsProvince) && - Objects.equals(this.countryCode, form1099Nec.countryCode) && + Objects.equals(this.email, form1099Nec.email) && Objects.equals(this.accountNumber, form1099Nec.accountNumber) && Objects.equals(this.officeCode, form1099Nec.officeCode) && + Objects.equals(this.nonUsProvince, form1099Nec.nonUsProvince) && + Objects.equals(this.countryCode, form1099Nec.countryCode) && + Objects.equals(this.federalEfileDate, form1099Nec.federalEfileDate) && + Objects.equals(this.postalMail, form1099Nec.postalMail) && + Objects.equals(this.stateEfileDate, form1099Nec.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099Nec.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099Nec.tinMatch) && + Objects.equals(this.noTin, form1099Nec.noTin) && + Objects.equals(this.addressVerification, form1099Nec.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099Nec.stateAndLocalWithholding) && + Objects.equals(this.secondTinNotice, form1099Nec.secondTinNotice) && + Objects.equals(this.federalEfileStatus, form1099Nec.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099Nec.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099Nec.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099Nec.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099Nec.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099Nec.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099Nec.validationErrors) && Objects.equals(this.createdAt, form1099Nec.createdAt) && - Objects.equals(this.updatedAt, form1099Nec.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099Nec.stateAndLocalWithholding); + Objects.equals(this.updatedAt, form1099Nec.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1110,7 +1164,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(nonemployeeCompensation, federalIncomeTaxWithheld, directSalesIndicator, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, fatcaFilingRequirement, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(nonemployeeCompensation, directSalesIndicator, federalIncomeTaxWithheld, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -1125,47 +1179,47 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Form1099Nec {\n"); sb.append(" nonemployeeCompensation: ").append(toIndentedString(nonemployeeCompensation)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1188,48 +1242,54 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("id"); openapiFields.add("type"); + openapiFields.add("id"); openapiFields.add("issuerId"); openapiFields.add("issuerReferenceId"); openapiFields.add("issuerTin"); openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); + openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); + openapiFields.add("email"); openapiFields.add("accountNumber"); openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("secondTinNotice"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("nonemployeeCompensation"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1252,12 +1312,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099Nec` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099Nec.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); } if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); @@ -1265,55 +1337,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } @@ -1332,17 +1371,58 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); @@ -1358,10 +1438,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecList.java deleted file mode 100644 index ed1b783..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecList.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1099NecListItem; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099NecList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099NecList { - public static final String SERIALIZED_NAME_FORMS = "forms"; - @SerializedName(SERIALIZED_NAME_FORMS) - private List forms; - - public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; - @SerializedName(SERIALIZED_NAME_FORM_TYPE) - private String formType; - - public Form1099NecList() { - } - - public Form1099NecList forms(List forms) { - this.forms = forms; - return this; - } - - public Form1099NecList addFormsItem(Form1099NecListItem formsItem) { - if (this.forms == null) { - this.forms = new ArrayList<>(); - } - this.forms.add(formsItem); - return this; - } - - /** - * Get forms - * @return forms - */ - @javax.annotation.Nullable - public List getForms() { - return forms; - } - - public void setForms(List forms) { - this.forms = forms; - } - - - public Form1099NecList formType(String formType) { - this.formType = formType; - return this; - } - - /** - * Get formType - * @return formType - */ - @javax.annotation.Nullable - public String getFormType() { - return formType; - } - - public void setFormType(String formType) { - this.formType = formType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099NecList form1099NecList = (Form1099NecList) o; - return Objects.equals(this.forms, form1099NecList.forms) && - Objects.equals(this.formType, form1099NecList.formType); - } - - @Override - public int hashCode() { - return Objects.hash(forms, formType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099NecList {\n"); - sb.append(" forms: ").append(toIndentedString(forms)).append("\n"); - sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("formType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099NecList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099NecList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099NecList is not found in the empty JSON string", Form1099NecList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099NecList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099NecList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("forms") != null && !jsonObj.get("forms").isJsonNull()) { - JsonArray jsonArrayforms = jsonObj.getAsJsonArray("forms"); - if (jsonArrayforms != null) { - // ensure the json data is an array - if (!jsonObj.get("forms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `forms` to be an array in the JSON string but got `%s`", jsonObj.get("forms").toString())); - } - - // validate the optional field `forms` (array) - for (int i = 0; i < jsonArrayforms.size(); i++) { - Form1099NecListItem.validateJsonElement(jsonArrayforms.get(i)); - }; - } - } - if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099NecList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099NecList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099NecList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099NecList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099NecList given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099NecList - * @throws IOException if the JSON string is invalid with respect to Form1099NecList - */ - public static Form1099NecList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099NecList.class); - } - - /** - * Convert an instance of Form1099NecList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItem.java deleted file mode 100644 index aa66566..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItem.java +++ /dev/null @@ -1,1126 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * 1099-NEC - Nonemployee compensation - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099NecListItem { - public static final String SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION = "nonemployeeCompensation"; - @SerializedName(SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION) - private Double nonemployeeCompensation; - - public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; - @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) - private Boolean directSalesIndicator; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099NecListItem() { - } - - public Form1099NecListItem nonemployeeCompensation(Double nonemployeeCompensation) { - this.nonemployeeCompensation = nonemployeeCompensation; - return this; - } - - /** - * Nonemployee compensation - * @return nonemployeeCompensation - */ - @javax.annotation.Nonnull - public Double getNonemployeeCompensation() { - return nonemployeeCompensation; - } - - public void setNonemployeeCompensation(Double nonemployeeCompensation) { - this.nonemployeeCompensation = nonemployeeCompensation; - } - - - public Form1099NecListItem directSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - return this; - } - - /** - * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * @return directSalesIndicator - */ - @javax.annotation.Nullable - public Boolean getDirectSalesIndicator() { - return directSalesIndicator; - } - - public void setDirectSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - } - - - public Form1099NecListItem federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099NecListItem issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099NecListItem issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099NecListItem taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nonnull - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099NecListItem issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099NecListItem referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099NecListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099NecListItem recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099NecListItem tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099NecListItem recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099NecListItem address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099NecListItem address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099NecListItem city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099NecListItem state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099NecListItem zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099NecListItem email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099NecListItem accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099NecListItem officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099NecListItem nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099NecListItem countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099NecListItem federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099NecListItem postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099NecListItem stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099NecListItem tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099NecListItem noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099NecListItem secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099NecListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099NecListItem addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099NecListItem stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099NecListItem form1099NecListItem = (Form1099NecListItem) o; - return Objects.equals(this.nonemployeeCompensation, form1099NecListItem.nonemployeeCompensation) && - Objects.equals(this.directSalesIndicator, form1099NecListItem.directSalesIndicator) && - Objects.equals(this.federalIncomeTaxWithheld, form1099NecListItem.federalIncomeTaxWithheld) && - Objects.equals(this.issuerReferenceId, form1099NecListItem.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099NecListItem.issuerTin) && - Objects.equals(this.taxYear, form1099NecListItem.taxYear) && - Objects.equals(this.issuerId, form1099NecListItem.issuerId) && - Objects.equals(this.referenceId, form1099NecListItem.referenceId) && - Objects.equals(this.recipientTin, form1099NecListItem.recipientTin) && - Objects.equals(this.recipientName, form1099NecListItem.recipientName) && - Objects.equals(this.tinType, form1099NecListItem.tinType) && - Objects.equals(this.recipientSecondName, form1099NecListItem.recipientSecondName) && - Objects.equals(this.address, form1099NecListItem.address) && - Objects.equals(this.address2, form1099NecListItem.address2) && - Objects.equals(this.city, form1099NecListItem.city) && - Objects.equals(this.state, form1099NecListItem.state) && - Objects.equals(this.zip, form1099NecListItem.zip) && - Objects.equals(this.email, form1099NecListItem.email) && - Objects.equals(this.accountNumber, form1099NecListItem.accountNumber) && - Objects.equals(this.officeCode, form1099NecListItem.officeCode) && - Objects.equals(this.nonUsProvince, form1099NecListItem.nonUsProvince) && - Objects.equals(this.countryCode, form1099NecListItem.countryCode) && - Objects.equals(this.federalEFile, form1099NecListItem.federalEFile) && - Objects.equals(this.postalMail, form1099NecListItem.postalMail) && - Objects.equals(this.stateEFile, form1099NecListItem.stateEFile) && - Objects.equals(this.tinMatch, form1099NecListItem.tinMatch) && - Objects.equals(this.noTin, form1099NecListItem.noTin) && - Objects.equals(this.secondTinNotice, form1099NecListItem.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, form1099NecListItem.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, form1099NecListItem.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099NecListItem.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(nonemployeeCompensation, directSalesIndicator, federalIncomeTaxWithheld, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099NecListItem {\n"); - sb.append(" nonemployeeCompensation: ").append(toIndentedString(nonemployeeCompensation)).append("\n"); - sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("nonemployeeCompensation"); - openapiRequiredFields.add("taxYear"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099NecListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099NecListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099NecListItem is not found in the empty JSON string", Form1099NecListItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099NecListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099NecListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099NecListItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099NecListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099NecListItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecListItem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099NecListItem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099NecListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099NecListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099NecListItem - * @throws IOException if the JSON string is invalid with respect to Form1099NecListItem - */ - public static Form1099NecListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099NecListItem.class); - } - - /** - * Convert an instance of Form1099NecListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItemResponse.java deleted file mode 100644 index c508483..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItemResponse.java +++ /dev/null @@ -1,1360 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099NecListItemResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099NecListItemResponse { - public static final String SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION = "nonemployeeCompensation"; - @SerializedName(SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION) - private Double nonemployeeCompensation; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; - @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) - private Boolean directSalesIndicator; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - public Form1099NecListItemResponse() { - } - - public Form1099NecListItemResponse( - String id, - StatusDetail federalEfileStatus, - List stateEfileStatus, - StatusDetail postalMailStatus, - StatusDetail tinMatchStatus, - StatusDetail addressVerificationStatus, - StatusDetail eDeliveryStatus, - List validationErrors, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.id = id; - this.federalEfileStatus = federalEfileStatus; - this.stateEfileStatus = stateEfileStatus; - this.postalMailStatus = postalMailStatus; - this.tinMatchStatus = tinMatchStatus; - this.addressVerificationStatus = addressVerificationStatus; - this.eDeliveryStatus = eDeliveryStatus; - this.validationErrors = validationErrors; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - public Form1099NecListItemResponse nonemployeeCompensation(Double nonemployeeCompensation) { - this.nonemployeeCompensation = nonemployeeCompensation; - return this; - } - - /** - * Nonemployee compensation - * @return nonemployeeCompensation - */ - @javax.annotation.Nullable - public Double getNonemployeeCompensation() { - return nonemployeeCompensation; - } - - public void setNonemployeeCompensation(Double nonemployeeCompensation) { - this.nonemployeeCompensation = nonemployeeCompensation; - } - - - public Form1099NecListItemResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099NecListItemResponse directSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - return this; - } - - /** - * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * @return directSalesIndicator - */ - @javax.annotation.Nullable - public Boolean getDirectSalesIndicator() { - return directSalesIndicator; - } - - public void setDirectSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - } - - - /** - * ID of the form - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - - public Form1099NecListItemResponse type(String type) { - this.type = type; - return this; - } - - /** - * Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public Form1099NecListItemResponse issuerId(Integer issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nonnull - public Integer getIssuerId() { - return issuerId; - } - - public void setIssuerId(Integer issuerId) { - this.issuerId = issuerId; - } - - - public Form1099NecListItemResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099NecListItemResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099NecListItemResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099NecListItemResponse federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Boolean indicating that federal e-filing has been scheduled for this form - * @return federalEfile - */ - @javax.annotation.Nonnull - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - /** - * Federal e-file status - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - - - public Form1099NecListItemResponse stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - return this; - } - - /** - * Boolean indicating that state e-filing has been scheduled for this form - * @return stateEfile - */ - @javax.annotation.Nonnull - public Boolean getStateEfile() { - return stateEfile; - } - - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - } - - - /** - * State e-file status - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - - - public Form1099NecListItemResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient has been scheduled for this form - * @return postalMail - */ - @javax.annotation.Nonnull - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - /** - * Postal mail to recipient status - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - - - public Form1099NecListItemResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching has been scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nonnull - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - /** - * TIN Match status - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - - - public Form1099NecListItemResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification has been scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nonnull - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - /** - * Address verification status - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - - - /** - * EDelivery status - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - - - public Form1099NecListItemResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099NecListItemResponse email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099NecListItemResponse tinType(String tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public String getTinType() { - return tinType; - } - - public void setTinType(String tinType) { - this.tinType = tinType; - } - - - public Form1099NecListItemResponse tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Recipient Tax ID Number - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public Form1099NecListItemResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099NecListItemResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second Tin Notice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099NecListItemResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099NecListItemResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099NecListItemResponse address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099NecListItemResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099NecListItemResponse city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099NecListItemResponse state(String state) { - this.state = state; - return this; - } - - /** - * US state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099NecListItemResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099NecListItemResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099NecListItemResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099NecListItemResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account Number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099NecListItemResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office Code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099NecListItemResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - /** - * Validation errors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - - - /** - * Creation time - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - /** - * Update time - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - public Form1099NecListItemResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099NecListItemResponse form1099NecListItemResponse = (Form1099NecListItemResponse) o; - return Objects.equals(this.nonemployeeCompensation, form1099NecListItemResponse.nonemployeeCompensation) && - Objects.equals(this.federalIncomeTaxWithheld, form1099NecListItemResponse.federalIncomeTaxWithheld) && - Objects.equals(this.directSalesIndicator, form1099NecListItemResponse.directSalesIndicator) && - Objects.equals(this.id, form1099NecListItemResponse.id) && - Objects.equals(this.type, form1099NecListItemResponse.type) && - Objects.equals(this.issuerId, form1099NecListItemResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099NecListItemResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099NecListItemResponse.issuerTin) && - Objects.equals(this.taxYear, form1099NecListItemResponse.taxYear) && - Objects.equals(this.federalEfile, form1099NecListItemResponse.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099NecListItemResponse.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099NecListItemResponse.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099NecListItemResponse.stateEfileStatus) && - Objects.equals(this.postalMail, form1099NecListItemResponse.postalMail) && - Objects.equals(this.postalMailStatus, form1099NecListItemResponse.postalMailStatus) && - Objects.equals(this.tinMatch, form1099NecListItemResponse.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099NecListItemResponse.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099NecListItemResponse.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099NecListItemResponse.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099NecListItemResponse.eDeliveryStatus) && - Objects.equals(this.referenceId, form1099NecListItemResponse.referenceId) && - Objects.equals(this.email, form1099NecListItemResponse.email) && - Objects.equals(this.tinType, form1099NecListItemResponse.tinType) && - Objects.equals(this.tin, form1099NecListItemResponse.tin) && - Objects.equals(this.noTin, form1099NecListItemResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099NecListItemResponse.secondTinNotice) && - Objects.equals(this.recipientName, form1099NecListItemResponse.recipientName) && - Objects.equals(this.recipientSecondName, form1099NecListItemResponse.recipientSecondName) && - Objects.equals(this.address, form1099NecListItemResponse.address) && - Objects.equals(this.address2, form1099NecListItemResponse.address2) && - Objects.equals(this.city, form1099NecListItemResponse.city) && - Objects.equals(this.state, form1099NecListItemResponse.state) && - Objects.equals(this.zip, form1099NecListItemResponse.zip) && - Objects.equals(this.nonUsProvince, form1099NecListItemResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099NecListItemResponse.countryCode) && - Objects.equals(this.accountNumber, form1099NecListItemResponse.accountNumber) && - Objects.equals(this.officeCode, form1099NecListItemResponse.officeCode) && - Objects.equals(this.fatcaFilingRequirement, form1099NecListItemResponse.fatcaFilingRequirement) && - Objects.equals(this.validationErrors, form1099NecListItemResponse.validationErrors) && - Objects.equals(this.createdAt, form1099NecListItemResponse.createdAt) && - Objects.equals(this.updatedAt, form1099NecListItemResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099NecListItemResponse.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(nonemployeeCompensation, federalIncomeTaxWithheld, directSalesIndicator, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, fatcaFilingRequirement, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099NecListItemResponse {\n"); - sb.append(" nonemployeeCompensation: ").append(toIndentedString(nonemployeeCompensation)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("recipientName"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("validationErrors"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("issuerId"); - openapiRequiredFields.add("federalEfile"); - openapiRequiredFields.add("stateEfile"); - openapiRequiredFields.add("postalMail"); - openapiRequiredFields.add("tinMatch"); - openapiRequiredFields.add("addressVerification"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099NecListItemResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099NecListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099NecListItemResponse is not found in the empty JSON string", Form1099NecListItemResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099NecListItemResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099NecListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099NecListItemResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099NecListItemResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099NecListItemResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecListItemResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099NecListItemResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099NecListItemResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099NecListItemResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099NecListItemResponse - * @throws IOException if the JSON string is invalid with respect to Form1099NecListItemResponse - */ - public static Form1099NecListItemResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099NecListItemResponse.class); - } - - /** - * Convert an instance of Form1099NecListItemResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecRequest.java deleted file mode 100644 index 11f994e..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecRequest.java +++ /dev/null @@ -1,1140 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099NecRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099NecRequest { - public static final String SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION = "nonemployeeCompensation"; - @SerializedName(SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION) - private Double nonemployeeCompensation; - - public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; - @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) - private Boolean directSalesIndicator; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099NecRequest() { - } - - public Form1099NecRequest nonemployeeCompensation(Double nonemployeeCompensation) { - this.nonemployeeCompensation = nonemployeeCompensation; - return this; - } - - /** - * Nonemployee compensation - * @return nonemployeeCompensation - */ - @javax.annotation.Nonnull - public Double getNonemployeeCompensation() { - return nonemployeeCompensation; - } - - public void setNonemployeeCompensation(Double nonemployeeCompensation) { - this.nonemployeeCompensation = nonemployeeCompensation; - } - - - public Form1099NecRequest directSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - return this; - } - - /** - * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale - * @return directSalesIndicator - */ - @javax.annotation.Nullable - public Boolean getDirectSalesIndicator() { - return directSalesIndicator; - } - - public void setDirectSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - } - - - public Form1099NecRequest federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099NecRequest type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Form1099NecRequest issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099NecRequest referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099NecRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099NecRequest recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099NecRequest tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099NecRequest recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099NecRequest address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099NecRequest address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099NecRequest city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099NecRequest state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099NecRequest zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099NecRequest email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099NecRequest accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099NecRequest officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099NecRequest nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099NecRequest countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099NecRequest federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099NecRequest postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099NecRequest stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099NecRequest tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099NecRequest noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099NecRequest secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099NecRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099NecRequest addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099NecRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099NecRequest form1099NecRequest = (Form1099NecRequest) o; - return Objects.equals(this.nonemployeeCompensation, form1099NecRequest.nonemployeeCompensation) && - Objects.equals(this.directSalesIndicator, form1099NecRequest.directSalesIndicator) && - Objects.equals(this.federalIncomeTaxWithheld, form1099NecRequest.federalIncomeTaxWithheld) && - Objects.equals(this.type, form1099NecRequest.type) && - Objects.equals(this.issuerId, form1099NecRequest.issuerId) && - Objects.equals(this.referenceId, form1099NecRequest.referenceId) && - Objects.equals(this.recipientTin, form1099NecRequest.recipientTin) && - Objects.equals(this.recipientName, form1099NecRequest.recipientName) && - Objects.equals(this.tinType, form1099NecRequest.tinType) && - Objects.equals(this.recipientSecondName, form1099NecRequest.recipientSecondName) && - Objects.equals(this.address, form1099NecRequest.address) && - Objects.equals(this.address2, form1099NecRequest.address2) && - Objects.equals(this.city, form1099NecRequest.city) && - Objects.equals(this.state, form1099NecRequest.state) && - Objects.equals(this.zip, form1099NecRequest.zip) && - Objects.equals(this.email, form1099NecRequest.email) && - Objects.equals(this.accountNumber, form1099NecRequest.accountNumber) && - Objects.equals(this.officeCode, form1099NecRequest.officeCode) && - Objects.equals(this.nonUsProvince, form1099NecRequest.nonUsProvince) && - Objects.equals(this.countryCode, form1099NecRequest.countryCode) && - Objects.equals(this.federalEFile, form1099NecRequest.federalEFile) && - Objects.equals(this.postalMail, form1099NecRequest.postalMail) && - Objects.equals(this.stateEFile, form1099NecRequest.stateEFile) && - Objects.equals(this.tinMatch, form1099NecRequest.tinMatch) && - Objects.equals(this.noTin, form1099NecRequest.noTin) && - Objects.equals(this.secondTinNotice, form1099NecRequest.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, form1099NecRequest.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, form1099NecRequest.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099NecRequest.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(nonemployeeCompensation, directSalesIndicator, federalIncomeTaxWithheld, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099NecRequest {\n"); - sb.append(" nonemployeeCompensation: ").append(toIndentedString(nonemployeeCompensation)).append("\n"); - sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("nonemployeeCompensation"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099NecRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099NecRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099NecRequest is not found in the empty JSON string", Form1099NecRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099NecRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099NecRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099NecRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099NecRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099NecRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099NecRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099NecRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099NecRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099NecRequest - * @throws IOException if the JSON string is invalid with respect to Form1099NecRequest - */ - public static Form1099NecRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099NecRequest.class); - } - - /** - * Convert an instance of Form1099NecRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecResponse.java deleted file mode 100644 index 51ef70b..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecResponse.java +++ /dev/null @@ -1,1522 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099NecResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099NecResponse { - public static final String SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION = "nonemployeeCompensation"; - @SerializedName(SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION) - private Double nonemployeeCompensation; - - public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; - @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) - private Boolean directSalesIndicator; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - /** - * Gets or Sets tinType - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public Form1099NecResponse() { - } - - public Form1099NecResponse( - TypeEnum type - ) { - this(); - this.type = type; - } - - public Form1099NecResponse nonemployeeCompensation(Double nonemployeeCompensation) { - this.nonemployeeCompensation = nonemployeeCompensation; - return this; - } - - /** - * Get nonemployeeCompensation - * @return nonemployeeCompensation - */ - @javax.annotation.Nullable - public Double getNonemployeeCompensation() { - return nonemployeeCompensation; - } - - public void setNonemployeeCompensation(Double nonemployeeCompensation) { - this.nonemployeeCompensation = nonemployeeCompensation; - } - - - public Form1099NecResponse directSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - return this; - } - - /** - * Get directSalesIndicator - * @return directSalesIndicator - */ - @javax.annotation.Nullable - public Boolean getDirectSalesIndicator() { - return directSalesIndicator; - } - - public void setDirectSalesIndicator(Boolean directSalesIndicator) { - this.directSalesIndicator = directSalesIndicator; - } - - - public Form1099NecResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Get federalIncomeTaxWithheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - - public Form1099NecResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Form1099NecResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099NecResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - public Form1099NecResponse tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Get tinType - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099NecResponse id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public Form1099NecResponse issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Get issuerId - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099NecResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Get issuerReferenceId - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099NecResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Get issuerTin - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099NecResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Get taxYear - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099NecResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099NecResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get recipientName - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099NecResponse recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Get recipientTin - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099NecResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Get recipientSecondName - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099NecResponse address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099NecResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Get address2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099NecResponse city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099NecResponse state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099NecResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099NecResponse email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099NecResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099NecResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Get officeCode - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099NecResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Get nonUsProvince - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099NecResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099NecResponse federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Get federalEFile - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099NecResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Get postalMail - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099NecResponse stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Get stateEFile - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099NecResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Get tinMatch - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099NecResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Get noTin - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099NecResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Get secondTinNotice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099NecResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Get addressVerification - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099NecResponse federalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - return this; - } - - /** - * Get federalEfileStatus - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - public void setFederalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - } - - - public Form1099NecResponse eDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - return this; - } - - /** - * Get eDeliveryStatus - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - } - - - public Form1099NecResponse stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099NecResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); - return this; - } - - /** - * Get stateEfileStatus - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - } - - - public Form1099NecResponse postalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - return this; - } - - /** - * Get postalMailStatus - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - public void setPostalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - } - - - public Form1099NecResponse tinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - return this; - } - - /** - * Get tinMatchStatus - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - public void setTinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - } - - - public Form1099NecResponse addressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - return this; - } - - /** - * Get addressVerificationStatus - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - } - - - public Form1099NecResponse validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1099NecResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } - - /** - * Get validationErrors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099NecResponse form1099NecResponse = (Form1099NecResponse) o; - return Objects.equals(this.nonemployeeCompensation, form1099NecResponse.nonemployeeCompensation) && - Objects.equals(this.directSalesIndicator, form1099NecResponse.directSalesIndicator) && - Objects.equals(this.federalIncomeTaxWithheld, form1099NecResponse.federalIncomeTaxWithheld) && - Objects.equals(this.type, form1099NecResponse.type) && - Objects.equals(this.createdAt, form1099NecResponse.createdAt) && - Objects.equals(this.updatedAt, form1099NecResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099NecResponse.stateAndLocalWithholding) && - Objects.equals(this.tinType, form1099NecResponse.tinType) && - Objects.equals(this.id, form1099NecResponse.id) && - Objects.equals(this.issuerId, form1099NecResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099NecResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099NecResponse.issuerTin) && - Objects.equals(this.taxYear, form1099NecResponse.taxYear) && - Objects.equals(this.referenceId, form1099NecResponse.referenceId) && - Objects.equals(this.recipientName, form1099NecResponse.recipientName) && - Objects.equals(this.recipientTin, form1099NecResponse.recipientTin) && - Objects.equals(this.recipientSecondName, form1099NecResponse.recipientSecondName) && - Objects.equals(this.address, form1099NecResponse.address) && - Objects.equals(this.address2, form1099NecResponse.address2) && - Objects.equals(this.city, form1099NecResponse.city) && - Objects.equals(this.state, form1099NecResponse.state) && - Objects.equals(this.zip, form1099NecResponse.zip) && - Objects.equals(this.email, form1099NecResponse.email) && - Objects.equals(this.accountNumber, form1099NecResponse.accountNumber) && - Objects.equals(this.officeCode, form1099NecResponse.officeCode) && - Objects.equals(this.nonUsProvince, form1099NecResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099NecResponse.countryCode) && - Objects.equals(this.federalEFile, form1099NecResponse.federalEFile) && - Objects.equals(this.postalMail, form1099NecResponse.postalMail) && - Objects.equals(this.stateEFile, form1099NecResponse.stateEFile) && - Objects.equals(this.tinMatch, form1099NecResponse.tinMatch) && - Objects.equals(this.noTin, form1099NecResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099NecResponse.secondTinNotice) && - Objects.equals(this.addressVerification, form1099NecResponse.addressVerification) && - Objects.equals(this.federalEfileStatus, form1099NecResponse.federalEfileStatus) && - Objects.equals(this.eDeliveryStatus, form1099NecResponse.eDeliveryStatus) && - Objects.equals(this.stateEfileStatus, form1099NecResponse.stateEfileStatus) && - Objects.equals(this.postalMailStatus, form1099NecResponse.postalMailStatus) && - Objects.equals(this.tinMatchStatus, form1099NecResponse.tinMatchStatus) && - Objects.equals(this.addressVerificationStatus, form1099NecResponse.addressVerificationStatus) && - Objects.equals(this.validationErrors, form1099NecResponse.validationErrors); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(nonemployeeCompensation, directSalesIndicator, federalIncomeTaxWithheld, type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099NecResponse {\n"); - sb.append(" nonemployeeCompensation: ").append(toIndentedString(nonemployeeCompensation)).append("\n"); - sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("tinType"); - openapiFields.add("id"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("referenceId"); - openapiFields.add("recipientName"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("addressVerification"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("validationErrors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099NecResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099NecResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099NecResponse is not found in the empty JSON string", Form1099NecResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099NecResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099NecResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099NecResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099NecResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099NecResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099NecResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099NecResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099NecResponse - * @throws IOException if the JSON string is invalid with respect to Form1099NecResponse - */ - public static Form1099NecResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099NecResponse.class); - } - - /** - * Convert an instance of Form1099NecResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResult.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResult.java deleted file mode 100644 index 6b54a19..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResult.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Data; -import Avalara.SDK.model.A1099.V2.Form1099ProccessResultProcessedFormsInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099ProccessResult - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099ProccessResult { - public static final String SERIALIZED_NAME_JOB_DATA = "jobData"; - @SerializedName(SERIALIZED_NAME_JOB_DATA) - private Data jobData; - - public static final String SERIALIZED_NAME_PROCESSED_FORMS = "processedForms"; - @SerializedName(SERIALIZED_NAME_PROCESSED_FORMS) - private List processedForms; - - public Form1099ProccessResult() { - } - - public Form1099ProccessResult jobData(Data jobData) { - this.jobData = jobData; - return this; - } - - /** - * Get jobData - * @return jobData - */ - @javax.annotation.Nullable - public Data getJobData() { - return jobData; - } - - public void setJobData(Data jobData) { - this.jobData = jobData; - } - - - public Form1099ProccessResult processedForms(List processedForms) { - this.processedForms = processedForms; - return this; - } - - public Form1099ProccessResult addProcessedFormsItem(Form1099ProccessResultProcessedFormsInner processedFormsItem) { - if (this.processedForms == null) { - this.processedForms = new ArrayList<>(); - } - this.processedForms.add(processedFormsItem); - return this; - } - - /** - * Get processedForms - * @return processedForms - */ - @javax.annotation.Nullable - public List getProcessedForms() { - return processedForms; - } - - public void setProcessedForms(List processedForms) { - this.processedForms = processedForms; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099ProccessResult form1099ProccessResult = (Form1099ProccessResult) o; - return Objects.equals(this.jobData, form1099ProccessResult.jobData) && - Objects.equals(this.processedForms, form1099ProccessResult.processedForms); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(jobData, processedForms); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099ProccessResult {\n"); - sb.append(" jobData: ").append(toIndentedString(jobData)).append("\n"); - sb.append(" processedForms: ").append(toIndentedString(processedForms)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("jobData"); - openapiFields.add("processedForms"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099ProccessResult - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099ProccessResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099ProccessResult is not found in the empty JSON string", Form1099ProccessResult.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099ProccessResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099ProccessResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `jobData` - if (jsonObj.get("jobData") != null && !jsonObj.get("jobData").isJsonNull()) { - Data.validateJsonElement(jsonObj.get("jobData")); - } - if (jsonObj.get("processedForms") != null && !jsonObj.get("processedForms").isJsonNull()) { - JsonArray jsonArrayprocessedForms = jsonObj.getAsJsonArray("processedForms"); - if (jsonArrayprocessedForms != null) { - // ensure the json data is an array - if (!jsonObj.get("processedForms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `processedForms` to be an array in the JSON string but got `%s`", jsonObj.get("processedForms").toString())); - } - - // validate the optional field `processedForms` (array) - for (int i = 0; i < jsonArrayprocessedForms.size(); i++) { - Form1099ProccessResultProcessedFormsInner.validateJsonElement(jsonArrayprocessedForms.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099ProccessResult.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099ProccessResult' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099ProccessResult.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099ProccessResult value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099ProccessResult read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099ProccessResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099ProccessResult - * @throws IOException if the JSON string is invalid with respect to Form1099ProccessResult - */ - public static Form1099ProccessResult fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099ProccessResult.class); - } - - /** - * Convert an instance of Form1099ProccessResult to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResultProcessedFormsInner.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResultProcessedFormsInner.java deleted file mode 100644 index 76d2865..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResultProcessedFormsInner.java +++ /dev/null @@ -1,555 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualReference; -import Avalara.SDK.model.A1099.V2.Form1042S; -import Avalara.SDK.model.A1099.V2.Form1095B; -import Avalara.SDK.model.A1099.V2.Form1099Div; -import Avalara.SDK.model.A1099.V2.Form1099Int; -import Avalara.SDK.model.A1099.V2.Form1099K; -import Avalara.SDK.model.A1099.V2.Form1099Misc; -import Avalara.SDK.model.A1099.V2.Form1099Nec; -import Avalara.SDK.model.A1099.V2.Form1099R; -import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; -import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough; -import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationError; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import Avalara.SDK.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099ProccessResultProcessedFormsInner extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(Form1099ProccessResultProcessedFormsInner.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099ProccessResultProcessedFormsInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099ProccessResultProcessedFormsInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterForm1042S = gson.getDelegateAdapter(this, TypeToken.get(Form1042S.class)); - final TypeAdapter adapterForm1095B = gson.getDelegateAdapter(this, TypeToken.get(Form1095B.class)); - final TypeAdapter adapterForm1099Div = gson.getDelegateAdapter(this, TypeToken.get(Form1099Div.class)); - final TypeAdapter adapterForm1099Int = gson.getDelegateAdapter(this, TypeToken.get(Form1099Int.class)); - final TypeAdapter adapterForm1099K = gson.getDelegateAdapter(this, TypeToken.get(Form1099K.class)); - final TypeAdapter adapterForm1099Misc = gson.getDelegateAdapter(this, TypeToken.get(Form1099Misc.class)); - final TypeAdapter adapterForm1099Nec = gson.getDelegateAdapter(this, TypeToken.get(Form1099Nec.class)); - final TypeAdapter adapterForm1099R = gson.getDelegateAdapter(this, TypeToken.get(Form1099R.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099ProccessResultProcessedFormsInner value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Form1042S` - if (value.getActualInstance() instanceof Form1042S) { - JsonElement element = adapterForm1042S.toJsonTree((Form1042S)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1095B` - if (value.getActualInstance() instanceof Form1095B) { - JsonElement element = adapterForm1095B.toJsonTree((Form1095B)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099Div` - if (value.getActualInstance() instanceof Form1099Div) { - JsonElement element = adapterForm1099Div.toJsonTree((Form1099Div)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099Int` - if (value.getActualInstance() instanceof Form1099Int) { - JsonElement element = adapterForm1099Int.toJsonTree((Form1099Int)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099K` - if (value.getActualInstance() instanceof Form1099K) { - JsonElement element = adapterForm1099K.toJsonTree((Form1099K)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099Misc` - if (value.getActualInstance() instanceof Form1099Misc) { - JsonElement element = adapterForm1099Misc.toJsonTree((Form1099Misc)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099Nec` - if (value.getActualInstance() instanceof Form1099Nec) { - JsonElement element = adapterForm1099Nec.toJsonTree((Form1099Nec)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099R` - if (value.getActualInstance() instanceof Form1099R) { - JsonElement element = adapterForm1099R.toJsonTree((Form1099R)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R"); - } - - @Override - public Form1099ProccessResultProcessedFormsInner read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Form1042S - try { - // validate the JSON object to see if any exception is thrown - Form1042S.validateJsonElement(jsonElement); - actualAdapter = adapterForm1042S; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1042S'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1042S failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1042S'", e); - } - // deserialize Form1095B - try { - // validate the JSON object to see if any exception is thrown - Form1095B.validateJsonElement(jsonElement); - actualAdapter = adapterForm1095B; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1095B'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1095B failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1095B'", e); - } - // deserialize Form1099Div - try { - // validate the JSON object to see if any exception is thrown - Form1099Div.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099Div; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099Div'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099Div failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099Div'", e); - } - // deserialize Form1099Int - try { - // validate the JSON object to see if any exception is thrown - Form1099Int.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099Int; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099Int'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099Int failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099Int'", e); - } - // deserialize Form1099K - try { - // validate the JSON object to see if any exception is thrown - Form1099K.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099K; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099K'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099K failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099K'", e); - } - // deserialize Form1099Misc - try { - // validate the JSON object to see if any exception is thrown - Form1099Misc.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099Misc; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099Misc'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099Misc failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099Misc'", e); - } - // deserialize Form1099Nec - try { - // validate the JSON object to see if any exception is thrown - Form1099Nec.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099Nec; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099Nec'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099Nec failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099Nec'", e); - } - // deserialize Form1099R - try { - // validate the JSON object to see if any exception is thrown - Form1099R.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099R; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099R'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099R failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099R'", e); - } - - if (match == 1) { - Form1099ProccessResultProcessedFormsInner ret = new Form1099ProccessResultProcessedFormsInner(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for Form1099ProccessResultProcessedFormsInner: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public Form1099ProccessResultProcessedFormsInner() { - super("oneOf", Boolean.FALSE); - } - - public Form1099ProccessResultProcessedFormsInner(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Form1042S", Form1042S.class); - schemas.put("Form1095B", Form1095B.class); - schemas.put("Form1099Div", Form1099Div.class); - schemas.put("Form1099Int", Form1099Int.class); - schemas.put("Form1099K", Form1099K.class); - schemas.put("Form1099Misc", Form1099Misc.class); - schemas.put("Form1099Nec", Form1099Nec.class); - schemas.put("Form1099R", Form1099R.class); - } - - @Override - public Map> getSchemas() { - return Form1099ProccessResultProcessedFormsInner.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Form1042S) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1095B) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099Div) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099Int) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099K) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099Misc) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099Nec) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099R) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R"); - } - - /** - * Get the actual instance, which can be the following: - * Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R - * - * @return The actual instance (Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Form1042S`. If the actual instance is not `Form1042S`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1042S` - * @throws ClassCastException if the instance is not `Form1042S` - */ - public Form1042S getForm1042S() throws ClassCastException { - return (Form1042S)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1095B`. If the actual instance is not `Form1095B`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1095B` - * @throws ClassCastException if the instance is not `Form1095B` - */ - public Form1095B getForm1095B() throws ClassCastException { - return (Form1095B)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099Div`. If the actual instance is not `Form1099Div`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099Div` - * @throws ClassCastException if the instance is not `Form1099Div` - */ - public Form1099Div getForm1099Div() throws ClassCastException { - return (Form1099Div)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099Int`. If the actual instance is not `Form1099Int`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099Int` - * @throws ClassCastException if the instance is not `Form1099Int` - */ - public Form1099Int getForm1099Int() throws ClassCastException { - return (Form1099Int)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099K`. If the actual instance is not `Form1099K`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099K` - * @throws ClassCastException if the instance is not `Form1099K` - */ - public Form1099K getForm1099K() throws ClassCastException { - return (Form1099K)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099Misc`. If the actual instance is not `Form1099Misc`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099Misc` - * @throws ClassCastException if the instance is not `Form1099Misc` - */ - public Form1099Misc getForm1099Misc() throws ClassCastException { - return (Form1099Misc)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099Nec`. If the actual instance is not `Form1099Nec`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099Nec` - * @throws ClassCastException if the instance is not `Form1099Nec` - */ - public Form1099Nec getForm1099Nec() throws ClassCastException { - return (Form1099Nec)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099R`. If the actual instance is not `Form1099R`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099R` - * @throws ClassCastException if the instance is not `Form1099R` - */ - public Form1099R getForm1099R() throws ClassCastException { - return (Form1099R)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099ProccessResultProcessedFormsInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Form1042S - try { - Form1042S.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1042S failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1095B - try { - Form1095B.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1095B failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099Div - try { - Form1099Div.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099Div failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099Int - try { - Form1099Int.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099Int failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099K - try { - Form1099K.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099K failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099Misc - try { - Form1099Misc.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099Misc failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099Nec - try { - Form1099Nec.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099Nec failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099R - try { - Form1099R.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099R failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Form1099ProccessResultProcessedFormsInner with oneOf schemas: Form1042S, Form1095B, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of Form1099ProccessResultProcessedFormsInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099ProccessResultProcessedFormsInner - * @throws IOException if the JSON string is invalid with respect to Form1099ProccessResultProcessedFormsInner - */ - public static Form1099ProccessResultProcessedFormsInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099ProccessResultProcessedFormsInner.class); - } - - /** - * Convert an instance of Form1099ProccessResultProcessedFormsInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java index 8da8c18..5c01c04 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java @@ -30,6 +30,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -61,13 +62,13 @@ import Avalara.SDK.JSON; /** - * Form1099R + * Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharing Plans, IRAs, Insurance Contracts, etc. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1099R { - public static final String SERIALIZED_NAME_GROSS_DISTRIBUTIONS = "grossDistributions"; - @SerializedName(SERIALIZED_NAME_GROSS_DISTRIBUTIONS) - private Double grossDistributions; + public static final String SERIALIZED_NAME_GROSS_DISTRIBUTION = "grossDistribution"; + @SerializedName(SERIALIZED_NAME_GROSS_DISTRIBUTION) + private Double grossDistribution; public static final String SERIALIZED_NAME_TAXABLE_AMOUNT = "taxableAmount"; @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT) @@ -77,81 +78,151 @@ public class Form1099R { @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT_NOT_DETERMINED) private Boolean taxableAmountNotDetermined; - public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_INDICATOR = "totalDistributionIndicator"; - @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_INDICATOR) - private Boolean totalDistributionIndicator; + public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_DETERMINED = "totalDistributionDetermined"; + @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_DETERMINED) + private Boolean totalDistributionDetermined; public static final String SERIALIZED_NAME_CAPITAL_GAIN = "capitalGain"; @SerializedName(SERIALIZED_NAME_CAPITAL_GAIN) private Double capitalGain; - public static final String SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD = "fedIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD) - private Double fedIncomeTaxWithheld; + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; - public static final String SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS = "employeeContributions"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS) - private Double employeeContributions; + public static final String SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS_OR_DESIGNATED_ROTH_OR_INSURANCE_PREMIUMS = "employeeContributionsOrDesignatedRothOrInsurancePremiums"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS_OR_DESIGNATED_ROTH_OR_INSURANCE_PREMIUMS) + private Double employeeContributionsOrDesignatedRothOrInsurancePremiums; - public static final String SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION = "netUnrealizedAppreciation"; - @SerializedName(SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION) - private Double netUnrealizedAppreciation; + public static final String SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION_IN_EMPLOYER_SECURITIES = "netUnrealizedAppreciationInEmployerSecurities"; + @SerializedName(SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION_IN_EMPLOYER_SECURITIES) + private Double netUnrealizedAppreciationInEmployerSecurities; - public static final String SERIALIZED_NAME_DISTRIBUTION_CODE_REQUIRED = "distributionCodeRequired"; - @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE_REQUIRED) - private String distributionCodeRequired; + public static final String SERIALIZED_NAME_DISTRIBUTION_CODE = "distributionCode"; + @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE) + private String distributionCode; - public static final String SERIALIZED_NAME_DISTRIBUTION_CODE_OPTIONAL = "distributionCodeOptional"; - @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE_OPTIONAL) - private String distributionCodeOptional; + public static final String SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE = "secondDistributionCode"; + @SerializedName(SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE) + private String secondDistributionCode; - public static final String SERIALIZED_NAME_IRA_SEP_SIMPLE_INDICATOR = "iraSepSimpleIndicator"; - @SerializedName(SERIALIZED_NAME_IRA_SEP_SIMPLE_INDICATOR) - private Boolean iraSepSimpleIndicator; + public static final String SERIALIZED_NAME_IRA_SEP_SIMPLE = "iraSepSimple"; + @SerializedName(SERIALIZED_NAME_IRA_SEP_SIMPLE) + private Boolean iraSepSimple; - public static final String SERIALIZED_NAME_TOTAL_IRA_SEP_SIMPLE_DISTRIBUTION = "totalIraSepSimpleDistribution"; - @SerializedName(SERIALIZED_NAME_TOTAL_IRA_SEP_SIMPLE_DISTRIBUTION) - private Double totalIraSepSimpleDistribution; + public static final String SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT = "traditionalIraSepSimpleOrRothConversionAmount"; + @SerializedName(SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT) + private Double traditionalIraSepSimpleOrRothConversionAmount; - public static final String SERIALIZED_NAME_OTHER = "other"; - @SerializedName(SERIALIZED_NAME_OTHER) - private Double other; + public static final String SERIALIZED_NAME_OTHER_AMOUNT = "otherAmount"; + @SerializedName(SERIALIZED_NAME_OTHER_AMOUNT) + private Double otherAmount; - public static final String SERIALIZED_NAME_OTHER_PERCENT = "otherPercent"; - @SerializedName(SERIALIZED_NAME_OTHER_PERCENT) - private String otherPercent; + public static final String SERIALIZED_NAME_OTHER_PERCENTAGE = "otherPercentage"; + @SerializedName(SERIALIZED_NAME_OTHER_PERCENTAGE) + private String otherPercentage; - public static final String SERIALIZED_NAME_PERCENTAGE_TOTAL_DISTRIBUTION = "percentageTotalDistribution"; - @SerializedName(SERIALIZED_NAME_PERCENTAGE_TOTAL_DISTRIBUTION) - private String percentageTotalDistribution; + public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_PERCENTAGE = "totalDistributionPercentage"; + @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_PERCENTAGE) + private String totalDistributionPercentage; public static final String SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS = "totalEmployeeContributions"; @SerializedName(SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS) private Double totalEmployeeContributions; - public static final String SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR = "amountAllocableToIrr"; - @SerializedName(SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR) - private Double amountAllocableToIrr; + public static final String SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR_WITHIN5_YEARS = "amountAllocableToIrrWithin5Years"; + @SerializedName(SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR_WITHIN5_YEARS) + private Double amountAllocableToIrrWithin5Years; - public static final String SERIALIZED_NAME_FIRST_YEAR_DESIGNATED_ROTH_CONTRIB = "firstYearDesignatedRothContrib"; - @SerializedName(SERIALIZED_NAME_FIRST_YEAR_DESIGNATED_ROTH_CONTRIB) - private String firstYearDesignatedRothContrib; + public static final String SERIALIZED_NAME_FIRST_YEAR_OF_DESIGNATED_ROTH_CONTRIBUTION = "firstYearOfDesignatedRothContribution"; + @SerializedName(SERIALIZED_NAME_FIRST_YEAR_OF_DESIGNATED_ROTH_CONTRIBUTION) + private String firstYearOfDesignatedRothContribution; public static final String SERIALIZED_NAME_DATE_OF_PAYMENT = "dateOfPayment"; @SerializedName(SERIALIZED_NAME_DATE_OF_PAYMENT) - private String dateOfPayment; + private LocalDate dateOfPayment; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; + public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; + @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) + private Boolean fatcaFilingRequirement; + + /** + * Form type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1099_NEC("1099-NEC"), + + _1099_MISC("1099-MISC"), + + _1099_DIV("1099-DIV"), + + _1099_R("1099-R"), + + _1099_K("1099-K"), + + _1095_B("1095-B"), + + _1042_S("1042-S"), + + _1095_C("1095-C"), + + _1099_INT("1099-INT"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private String type; + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; + private String issuerId; public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) @@ -165,81 +236,79 @@ public class Form1099R { @SerializedName(SERIALIZED_NAME_TAX_YEAR) private Integer taxYear; - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private Form1099StatusDetail postalMailStatus; + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; + /** + * Type of TIN (Tax ID Number) + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EMPTY("Empty"), + + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"); + + private String value; + + TinTypeEnum(String value) { + this.value = value; + } - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private Form1099StatusDetail tinMatchStatus; + public String getValue() { + return value; + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; + @Override + public String toString() { + return String.valueOf(value); + } - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private Form1099StatusDetail addressVerificationStatus; + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private Form1099StatusDetail eDeliveryStatus; + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; + private TinTypeEnum tinType; public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) @@ -265,6 +334,18 @@ public class Form1099R { @SerializedName(SERIALIZED_NAME_ZIP) private String zip; + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -273,13 +354,65 @@ public class Form1099R { @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) private String countryCode; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) @@ -293,29 +426,50 @@ public class Form1099R { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholding stateAndLocalWithholding; - public Form1099R() { } - public Form1099R grossDistributions(Double grossDistributions) { - this.grossDistributions = grossDistributions; + public Form1099R( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public Form1099R grossDistribution(Double grossDistribution) { + this.grossDistribution = grossDistribution; return this; } /** - * Get grossDistributions - * @return grossDistributions + * Gross distribution + * @return grossDistribution */ @javax.annotation.Nullable - public Double getGrossDistributions() { - return grossDistributions; + public Double getGrossDistribution() { + return grossDistribution; } - public void setGrossDistributions(Double grossDistributions) { - this.grossDistributions = grossDistributions; + public void setGrossDistribution(Double grossDistribution) { + this.grossDistribution = grossDistribution; } @@ -325,7 +479,7 @@ public Form1099R taxableAmount(Double taxableAmount) { } /** - * Get taxableAmount + * Taxable amount * @return taxableAmount */ @javax.annotation.Nullable @@ -344,7 +498,7 @@ public Form1099R taxableAmountNotDetermined(Boolean taxableAmountNotDetermined) } /** - * Get taxableAmountNotDetermined + * Taxable amount not determined * @return taxableAmountNotDetermined */ @javax.annotation.Nullable @@ -357,22 +511,22 @@ public void setTaxableAmountNotDetermined(Boolean taxableAmountNotDetermined) { } - public Form1099R totalDistributionIndicator(Boolean totalDistributionIndicator) { - this.totalDistributionIndicator = totalDistributionIndicator; + public Form1099R totalDistributionDetermined(Boolean totalDistributionDetermined) { + this.totalDistributionDetermined = totalDistributionDetermined; return this; } /** - * Get totalDistributionIndicator - * @return totalDistributionIndicator + * Total distribution + * @return totalDistributionDetermined */ @javax.annotation.Nullable - public Boolean getTotalDistributionIndicator() { - return totalDistributionIndicator; + public Boolean getTotalDistributionDetermined() { + return totalDistributionDetermined; } - public void setTotalDistributionIndicator(Boolean totalDistributionIndicator) { - this.totalDistributionIndicator = totalDistributionIndicator; + public void setTotalDistributionDetermined(Boolean totalDistributionDetermined) { + this.totalDistributionDetermined = totalDistributionDetermined; } @@ -382,7 +536,7 @@ public Form1099R capitalGain(Double capitalGain) { } /** - * Get capitalGain + * Capital gain (included in Box 2a) * @return capitalGain */ @javax.annotation.Nullable @@ -395,193 +549,193 @@ public void setCapitalGain(Double capitalGain) { } - public Form1099R fedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; + public Form1099R federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; return this; } /** - * Get fedIncomeTaxWithheld - * @return fedIncomeTaxWithheld + * Federal income tax withheld + * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable - public Double getFedIncomeTaxWithheld() { - return fedIncomeTaxWithheld; + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; } - public void setFedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; } - public Form1099R employeeContributions(Double employeeContributions) { - this.employeeContributions = employeeContributions; + public Form1099R employeeContributionsOrDesignatedRothOrInsurancePremiums(Double employeeContributionsOrDesignatedRothOrInsurancePremiums) { + this.employeeContributionsOrDesignatedRothOrInsurancePremiums = employeeContributionsOrDesignatedRothOrInsurancePremiums; return this; } /** - * Get employeeContributions - * @return employeeContributions + * Employee contributions/Designated Roth contributions or insurance premiums + * @return employeeContributionsOrDesignatedRothOrInsurancePremiums */ @javax.annotation.Nullable - public Double getEmployeeContributions() { - return employeeContributions; + public Double getEmployeeContributionsOrDesignatedRothOrInsurancePremiums() { + return employeeContributionsOrDesignatedRothOrInsurancePremiums; } - public void setEmployeeContributions(Double employeeContributions) { - this.employeeContributions = employeeContributions; + public void setEmployeeContributionsOrDesignatedRothOrInsurancePremiums(Double employeeContributionsOrDesignatedRothOrInsurancePremiums) { + this.employeeContributionsOrDesignatedRothOrInsurancePremiums = employeeContributionsOrDesignatedRothOrInsurancePremiums; } - public Form1099R netUnrealizedAppreciation(Double netUnrealizedAppreciation) { - this.netUnrealizedAppreciation = netUnrealizedAppreciation; + public Form1099R netUnrealizedAppreciationInEmployerSecurities(Double netUnrealizedAppreciationInEmployerSecurities) { + this.netUnrealizedAppreciationInEmployerSecurities = netUnrealizedAppreciationInEmployerSecurities; return this; } /** - * Get netUnrealizedAppreciation - * @return netUnrealizedAppreciation + * Net unrealized appreciation in employer's securities + * @return netUnrealizedAppreciationInEmployerSecurities */ @javax.annotation.Nullable - public Double getNetUnrealizedAppreciation() { - return netUnrealizedAppreciation; + public Double getNetUnrealizedAppreciationInEmployerSecurities() { + return netUnrealizedAppreciationInEmployerSecurities; } - public void setNetUnrealizedAppreciation(Double netUnrealizedAppreciation) { - this.netUnrealizedAppreciation = netUnrealizedAppreciation; + public void setNetUnrealizedAppreciationInEmployerSecurities(Double netUnrealizedAppreciationInEmployerSecurities) { + this.netUnrealizedAppreciationInEmployerSecurities = netUnrealizedAppreciationInEmployerSecurities; } - public Form1099R distributionCodeRequired(String distributionCodeRequired) { - this.distributionCodeRequired = distributionCodeRequired; + public Form1099R distributionCode(String distributionCode) { + this.distributionCode = distributionCode; return this; } /** - * Get distributionCodeRequired - * @return distributionCodeRequired + * Distribution code + * @return distributionCode */ @javax.annotation.Nullable - public String getDistributionCodeRequired() { - return distributionCodeRequired; + public String getDistributionCode() { + return distributionCode; } - public void setDistributionCodeRequired(String distributionCodeRequired) { - this.distributionCodeRequired = distributionCodeRequired; + public void setDistributionCode(String distributionCode) { + this.distributionCode = distributionCode; } - public Form1099R distributionCodeOptional(String distributionCodeOptional) { - this.distributionCodeOptional = distributionCodeOptional; + public Form1099R secondDistributionCode(String secondDistributionCode) { + this.secondDistributionCode = secondDistributionCode; return this; } /** - * Get distributionCodeOptional - * @return distributionCodeOptional + * Second distribution code + * @return secondDistributionCode */ @javax.annotation.Nullable - public String getDistributionCodeOptional() { - return distributionCodeOptional; + public String getSecondDistributionCode() { + return secondDistributionCode; } - public void setDistributionCodeOptional(String distributionCodeOptional) { - this.distributionCodeOptional = distributionCodeOptional; + public void setSecondDistributionCode(String secondDistributionCode) { + this.secondDistributionCode = secondDistributionCode; } - public Form1099R iraSepSimpleIndicator(Boolean iraSepSimpleIndicator) { - this.iraSepSimpleIndicator = iraSepSimpleIndicator; + public Form1099R iraSepSimple(Boolean iraSepSimple) { + this.iraSepSimple = iraSepSimple; return this; } /** - * Get iraSepSimpleIndicator - * @return iraSepSimpleIndicator + * IRA/SEP/SIMPLE + * @return iraSepSimple */ @javax.annotation.Nullable - public Boolean getIraSepSimpleIndicator() { - return iraSepSimpleIndicator; + public Boolean getIraSepSimple() { + return iraSepSimple; } - public void setIraSepSimpleIndicator(Boolean iraSepSimpleIndicator) { - this.iraSepSimpleIndicator = iraSepSimpleIndicator; + public void setIraSepSimple(Boolean iraSepSimple) { + this.iraSepSimple = iraSepSimple; } - public Form1099R totalIraSepSimpleDistribution(Double totalIraSepSimpleDistribution) { - this.totalIraSepSimpleDistribution = totalIraSepSimpleDistribution; + public Form1099R traditionalIraSepSimpleOrRothConversionAmount(Double traditionalIraSepSimpleOrRothConversionAmount) { + this.traditionalIraSepSimpleOrRothConversionAmount = traditionalIraSepSimpleOrRothConversionAmount; return this; } /** - * Get totalIraSepSimpleDistribution - * @return totalIraSepSimpleDistribution + * Traditional IRA/SEP/SIMPLE or Roth conversion amount + * @return traditionalIraSepSimpleOrRothConversionAmount */ @javax.annotation.Nullable - public Double getTotalIraSepSimpleDistribution() { - return totalIraSepSimpleDistribution; + public Double getTraditionalIraSepSimpleOrRothConversionAmount() { + return traditionalIraSepSimpleOrRothConversionAmount; } - public void setTotalIraSepSimpleDistribution(Double totalIraSepSimpleDistribution) { - this.totalIraSepSimpleDistribution = totalIraSepSimpleDistribution; + public void setTraditionalIraSepSimpleOrRothConversionAmount(Double traditionalIraSepSimpleOrRothConversionAmount) { + this.traditionalIraSepSimpleOrRothConversionAmount = traditionalIraSepSimpleOrRothConversionAmount; } - public Form1099R other(Double other) { - this.other = other; + public Form1099R otherAmount(Double otherAmount) { + this.otherAmount = otherAmount; return this; } /** - * Get other - * @return other + * Other amount + * @return otherAmount */ @javax.annotation.Nullable - public Double getOther() { - return other; + public Double getOtherAmount() { + return otherAmount; } - public void setOther(Double other) { - this.other = other; + public void setOtherAmount(Double otherAmount) { + this.otherAmount = otherAmount; } - public Form1099R otherPercent(String otherPercent) { - this.otherPercent = otherPercent; + public Form1099R otherPercentage(String otherPercentage) { + this.otherPercentage = otherPercentage; return this; } /** - * Get otherPercent - * @return otherPercent + * Other percentage + * @return otherPercentage */ @javax.annotation.Nullable - public String getOtherPercent() { - return otherPercent; + public String getOtherPercentage() { + return otherPercentage; } - public void setOtherPercent(String otherPercent) { - this.otherPercent = otherPercent; + public void setOtherPercentage(String otherPercentage) { + this.otherPercentage = otherPercentage; } - public Form1099R percentageTotalDistribution(String percentageTotalDistribution) { - this.percentageTotalDistribution = percentageTotalDistribution; + public Form1099R totalDistributionPercentage(String totalDistributionPercentage) { + this.totalDistributionPercentage = totalDistributionPercentage; return this; } /** - * Get percentageTotalDistribution - * @return percentageTotalDistribution + * Total distribution percentage + * @return totalDistributionPercentage */ @javax.annotation.Nullable - public String getPercentageTotalDistribution() { - return percentageTotalDistribution; + public String getTotalDistributionPercentage() { + return totalDistributionPercentage; } - public void setPercentageTotalDistribution(String percentageTotalDistribution) { - this.percentageTotalDistribution = percentageTotalDistribution; + public void setTotalDistributionPercentage(String totalDistributionPercentage) { + this.totalDistributionPercentage = totalDistributionPercentage; } @@ -591,7 +745,7 @@ public Form1099R totalEmployeeContributions(Double totalEmployeeContributions) { } /** - * Get totalEmployeeContributions + * Total employee contributions * @return totalEmployeeContributions */ @javax.annotation.Nullable @@ -604,116 +758,127 @@ public void setTotalEmployeeContributions(Double totalEmployeeContributions) { } - public Form1099R amountAllocableToIrr(Double amountAllocableToIrr) { - this.amountAllocableToIrr = amountAllocableToIrr; + public Form1099R amountAllocableToIrrWithin5Years(Double amountAllocableToIrrWithin5Years) { + this.amountAllocableToIrrWithin5Years = amountAllocableToIrrWithin5Years; return this; } /** - * Get amountAllocableToIrr - * @return amountAllocableToIrr + * Amount allocable to IRR within 5 years + * @return amountAllocableToIrrWithin5Years */ @javax.annotation.Nullable - public Double getAmountAllocableToIrr() { - return amountAllocableToIrr; + public Double getAmountAllocableToIrrWithin5Years() { + return amountAllocableToIrrWithin5Years; } - public void setAmountAllocableToIrr(Double amountAllocableToIrr) { - this.amountAllocableToIrr = amountAllocableToIrr; + public void setAmountAllocableToIrrWithin5Years(Double amountAllocableToIrrWithin5Years) { + this.amountAllocableToIrrWithin5Years = amountAllocableToIrrWithin5Years; } - public Form1099R firstYearDesignatedRothContrib(String firstYearDesignatedRothContrib) { - this.firstYearDesignatedRothContrib = firstYearDesignatedRothContrib; + public Form1099R firstYearOfDesignatedRothContribution(String firstYearOfDesignatedRothContribution) { + this.firstYearOfDesignatedRothContribution = firstYearOfDesignatedRothContribution; return this; } /** - * Get firstYearDesignatedRothContrib - * @return firstYearDesignatedRothContrib + * First year of designated Roth contribution + * @return firstYearOfDesignatedRothContribution */ @javax.annotation.Nullable - public String getFirstYearDesignatedRothContrib() { - return firstYearDesignatedRothContrib; + public String getFirstYearOfDesignatedRothContribution() { + return firstYearOfDesignatedRothContribution; } - public void setFirstYearDesignatedRothContrib(String firstYearDesignatedRothContrib) { - this.firstYearDesignatedRothContrib = firstYearDesignatedRothContrib; + public void setFirstYearOfDesignatedRothContribution(String firstYearOfDesignatedRothContribution) { + this.firstYearOfDesignatedRothContribution = firstYearOfDesignatedRothContribution; } - public Form1099R dateOfPayment(String dateOfPayment) { + public Form1099R dateOfPayment(LocalDate dateOfPayment) { this.dateOfPayment = dateOfPayment; return this; } /** - * Get dateOfPayment + * Date of payment * @return dateOfPayment */ @javax.annotation.Nullable - public String getDateOfPayment() { + public LocalDate getDateOfPayment() { return dateOfPayment; } - public void setDateOfPayment(String dateOfPayment) { + public void setDateOfPayment(LocalDate dateOfPayment) { this.dateOfPayment = dateOfPayment; } - public Form1099R id(String id) { - this.id = id; + public Form1099R fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; return this; } /** - * Get id - * @return id + * FATCA filing requirement + * @return fatcaFilingRequirement */ @javax.annotation.Nullable - public String getId() { - return id; + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; } - public void setId(String id) { - this.id = id; + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; } - public Form1099R type(String type) { + public Form1099R type(TypeEnum type) { this.type = type; return this; } /** - * Get type + * Form type * @return type */ - @javax.annotation.Nullable - public String getType() { + @javax.annotation.Nonnull + public TypeEnum getType() { return type; } - public void setType(String type) { + public void setType(TypeEnum type) { this.type = type; } - public Form1099R issuerId(Integer issuerId) { + /** + * Form ID. Unique identifier set when the record is created. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + + public Form1099R issuerId(String issuerId) { this.issuerId = issuerId; return this; } /** - * Get issuerId + * Issuer ID - only required when creating forms * @return issuerId */ @javax.annotation.Nullable - public Integer getIssuerId() { + public String getIssuerId() { return issuerId; } - public void setIssuerId(Integer issuerId) { + public void setIssuerId(String issuerId) { this.issuerId = issuerId; } @@ -724,7 +889,7 @@ public Form1099R issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID - only required when creating forms * @return issuerReferenceId */ @javax.annotation.Nullable @@ -743,7 +908,7 @@ public Form1099R issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN - readonly * @return issuerTin */ @javax.annotation.Nullable @@ -762,7 +927,7 @@ public Form1099R taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax Year - only required when creating forms * @return taxYear */ @javax.annotation.Nullable @@ -775,580 +940,530 @@ public void setTaxYear(Integer taxYear) { } - public Form1099R federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; + public Form1099R referenceId(String referenceId) { + this.referenceId = referenceId; return this; } /** - * Get federalEfile - * @return federalEfile + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId */ @javax.annotation.Nullable - public Boolean getFederalEfile() { - return federalEfile; + public String getReferenceId() { + return referenceId; } - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; } - public Form1099R federalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public Form1099R tin(String tin) { + this.tin = tin; return this; } /** - * Get federalEfileStatus - * @return federalEfileStatus + * Recipient's Federal Tax Identification Number (TIN). + * @return tin */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { - return federalEfileStatus; + public String getTin() { + return tin; } - public void setFederalEfileStatus(Form1099StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; + public void setTin(String tin) { + this.tin = tin; } - public Form1099R stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public Form1099R recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get stateEfile - * @return stateEfile + * Recipient name + * @return recipientName */ @javax.annotation.Nullable - public Boolean getStateEfile() { - return stateEfile; + public String getRecipientName() { + return recipientName; } - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } - public Form1099R stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099R addStateEfileStatusItem(StateEfileStatusDetail stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); + public Form1099R tinType(TinTypeEnum tinType) { + this.tinType = tinType; return this; } /** - * Get stateEfileStatus - * @return stateEfileStatus + * Type of TIN (Tax ID Number) + * @return tinType */ @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; + public TinTypeEnum getTinType() { + return tinType; } - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; } - public Form1099R postalMail(Boolean postalMail) { - this.postalMail = postalMail; + public Form1099R recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; return this; } /** - * Get postalMail - * @return postalMail + * Recipient second name + * @return recipientSecondName */ @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; + public String getRecipientSecondName() { + return recipientSecondName; } - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; } - public Form1099R postalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public Form1099R address(String address) { + this.address = address; return this; } /** - * Get postalMailStatus - * @return postalMailStatus + * Address. + * @return address */ @javax.annotation.Nullable - public Form1099StatusDetail getPostalMailStatus() { - return postalMailStatus; + public String getAddress() { + return address; } - public void setPostalMailStatus(Form1099StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; + public void setAddress(String address) { + this.address = address; } - public Form1099R tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public Form1099R address2(String address2) { + this.address2 = address2; return this; } /** - * Get tinMatch - * @return tinMatch + * Address line 2. + * @return address2 */ @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; + public String getAddress2() { + return address2; } - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; + public void setAddress2(String address2) { + this.address2 = address2; } - public Form1099R tinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public Form1099R city(String city) { + this.city = city; return this; } /** - * Get tinMatchStatus - * @return tinMatchStatus + * City. + * @return city */ @javax.annotation.Nullable - public Form1099StatusDetail getTinMatchStatus() { - return tinMatchStatus; + public String getCity() { + return city; } - public void setTinMatchStatus(Form1099StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; + public void setCity(String city) { + this.city = city; } - public Form1099R addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public Form1099R state(String state) { + this.state = state; return this; } /** - * Get addressVerification - * @return addressVerification + * Two-letter US state or Canadian province code (required for US/CA addresses). + * @return state */ @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; + public String getState() { + return state; } - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; + public void setState(String state) { + this.state = state; } - public Form1099R addressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public Form1099R zip(String zip) { + this.zip = zip; return this; } /** - * Get addressVerificationStatus - * @return addressVerificationStatus + * ZIP/postal code. + * @return zip */ @javax.annotation.Nullable - public Form1099StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; + public String getZip() { + return zip; } - public void setAddressVerificationStatus(Form1099StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; + public void setZip(String zip) { + this.zip = zip; } - public Form1099R eDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public Form1099R email(String email) { + this.email = email; return this; } /** - * Get eDeliveryStatus - * @return eDeliveryStatus + * Recipient's Contact email address. + * @return email */ @javax.annotation.Nullable - public Form1099StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; + public String getEmail() { + return email; } - public void seteDeliveryStatus(Form1099StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; + public void setEmail(String email) { + this.email = email; } - public Form1099R referenceId(String referenceId) { - this.referenceId = referenceId; + public Form1099R accountNumber(String accountNumber) { + this.accountNumber = accountNumber; return this; } /** - * Get referenceId - * @return referenceId + * Account number + * @return accountNumber */ @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; + public String getAccountNumber() { + return accountNumber; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; } - public Form1099R email(String email) { - this.email = email; + public Form1099R officeCode(String officeCode) { + this.officeCode = officeCode; return this; } /** - * Get email - * @return email + * Office code + * @return officeCode */ @javax.annotation.Nullable - public String getEmail() { - return email; + public String getOfficeCode() { + return officeCode; } - public void setEmail(String email) { - this.email = email; + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; } - public Form1099R tinType(String tinType) { - this.tinType = tinType; + public Form1099R nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; return this; } /** - * Get tinType - * @return tinType + * Province or region for non-US/CA addresses. + * @return nonUsProvince */ @javax.annotation.Nullable - public String getTinType() { - return tinType; + public String getNonUsProvince() { + return nonUsProvince; } - public void setTinType(String tinType) { - this.tinType = tinType; + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; } - public Form1099R fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public Form1099R countryCode(String countryCode) { + this.countryCode = countryCode; return this; } /** - * Get fatcaFilingRequirement - * @return fatcaFilingRequirement + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode */ @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; + public String getCountryCode() { + return countryCode; } - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; } - public Form1099R tin(String tin) { - this.tin = tin; + public Form1099R federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; return this; } /** - * Get tin - * @return tin + * Date when federal e-filing should be scheduled for this form + * @return federalEfileDate */ @javax.annotation.Nullable - public String getTin() { - return tin; + public LocalDate getFederalEfileDate() { + return federalEfileDate; } - public void setTin(String tin) { - this.tin = tin; + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; } - public Form1099R noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099R postalMail(Boolean postalMail) { + this.postalMail = postalMail; return this; } /** - * Get noTin - * @return noTin + * Boolean indicating that postal mailing to the recipient should be scheduled for this form + * @return postalMail */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getPostalMail() { + return postalMail; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; + public void setPostalMail(Boolean postalMail) { + this.postalMail = postalMail; } - public Form1099R secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public Form1099R stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; return this; } /** - * Get secondTinNotice - * @return secondTinNotice + * Date when state e-filing should be scheduled for this form + * @return stateEfileDate */ @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; + public LocalDate getStateEfileDate() { + return stateEfileDate; } - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; } - public Form1099R recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099R recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; return this; } /** - * Get recipientName - * @return recipientName + * Date when recipient e-delivery should be scheduled for this form + * @return recipientEdeliveryDate */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; } - public Form1099R recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public Form1099R tinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; return this; } /** - * Get recipientSecondName - * @return recipientSecondName + * Boolean indicating that TIN Matching should be scheduled for this form + * @return tinMatch */ @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; + public Boolean getTinMatch() { + return tinMatch; } - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; + public void setTinMatch(Boolean tinMatch) { + this.tinMatch = tinMatch; } - public Form1099R address(String address) { - this.address = address; + public Form1099R noTin(Boolean noTin) { + this.noTin = noTin; return this; } /** - * Get address - * @return address + * No TIN indicator + * @return noTin */ @javax.annotation.Nullable - public String getAddress() { - return address; + public Boolean getNoTin() { + return noTin; } - public void setAddress(String address) { - this.address = address; + public void setNoTin(Boolean noTin) { + this.noTin = noTin; } - public Form1099R address2(String address2) { - this.address2 = address2; + public Form1099R addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * Get address2 - * @return address2 + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public String getAddress2() { - return address2; + public Boolean getAddressVerification() { + return addressVerification; } - public void setAddress2(String address2) { - this.address2 = address2; + public void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } - public Form1099R city(String city) { - this.city = city; + public Form1099R stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; return this; } /** - * Get city - * @return city + * State and local withholding information + * @return stateAndLocalWithholding */ @javax.annotation.Nullable - public String getCity() { - return city; + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; } - public void setCity(String city) { - this.city = city; + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; } - public Form1099R state(String state) { - this.state = state; + public Form1099R secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; return this; } /** - * Get state - * @return state + * Second TIN notice + * @return secondTinNotice */ @javax.annotation.Nullable - public String getState() { - return state; + public Boolean getSecondTinNotice() { + return secondTinNotice; } - public void setState(String state) { - this.state = state; + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; } - public Form1099R zip(String zip) { - this.zip = zip; - return this; - } - /** - * Get zip - * @return zip + * Federal e-file status + * @return federalEfileStatus */ @javax.annotation.Nullable - public String getZip() { - return zip; + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; } - public void setZip(String zip) { - this.zip = zip; - } - public Form1099R nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - /** - * Get nonUsProvince - * @return nonUsProvince + * State e-file status + * @return stateEfileStatus */ @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; + public List getStateEfileStatus() { + return stateEfileStatus; } - public Form1099R countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } /** - * Get countryCode - * @return countryCode + * Postal mail to recipient status + * @return postalMailStatus */ @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; } - public Form1099R accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } /** - * Get accountNumber - * @return accountNumber + * TIN Match status + * @return tinMatchStatus */ @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - public Form1099R officeCode(String officeCode) { - this.officeCode = officeCode; - return this; + /** + * Address verification status + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; } + + /** - * Get officeCode - * @return officeCode + * EDelivery status + * @return eDeliveryStatus */ @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; } - public Form1099R validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1099R addValidationErrorsItem(ValidationError validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } /** - * Get validationErrors + * Validation errors * @return validationErrors */ @javax.annotation.Nullable @@ -1356,18 +1471,10 @@ public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - public Form1099R createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } /** - * Get createdAt + * Date time when the record was created. * @return createdAt */ @javax.annotation.Nullable @@ -1375,18 +1482,10 @@ public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - public Form1099R updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - /** - * Get updatedAt + * Date time when the record was last updated. * @return updatedAt */ @javax.annotation.Nullable @@ -1394,28 +1493,6 @@ public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099R stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholding getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } @@ -1428,64 +1505,65 @@ public boolean equals(Object o) { return false; } Form1099R form1099R = (Form1099R) o; - return Objects.equals(this.grossDistributions, form1099R.grossDistributions) && + return Objects.equals(this.grossDistribution, form1099R.grossDistribution) && Objects.equals(this.taxableAmount, form1099R.taxableAmount) && Objects.equals(this.taxableAmountNotDetermined, form1099R.taxableAmountNotDetermined) && - Objects.equals(this.totalDistributionIndicator, form1099R.totalDistributionIndicator) && + Objects.equals(this.totalDistributionDetermined, form1099R.totalDistributionDetermined) && Objects.equals(this.capitalGain, form1099R.capitalGain) && - Objects.equals(this.fedIncomeTaxWithheld, form1099R.fedIncomeTaxWithheld) && - Objects.equals(this.employeeContributions, form1099R.employeeContributions) && - Objects.equals(this.netUnrealizedAppreciation, form1099R.netUnrealizedAppreciation) && - Objects.equals(this.distributionCodeRequired, form1099R.distributionCodeRequired) && - Objects.equals(this.distributionCodeOptional, form1099R.distributionCodeOptional) && - Objects.equals(this.iraSepSimpleIndicator, form1099R.iraSepSimpleIndicator) && - Objects.equals(this.totalIraSepSimpleDistribution, form1099R.totalIraSepSimpleDistribution) && - Objects.equals(this.other, form1099R.other) && - Objects.equals(this.otherPercent, form1099R.otherPercent) && - Objects.equals(this.percentageTotalDistribution, form1099R.percentageTotalDistribution) && + Objects.equals(this.federalIncomeTaxWithheld, form1099R.federalIncomeTaxWithheld) && + Objects.equals(this.employeeContributionsOrDesignatedRothOrInsurancePremiums, form1099R.employeeContributionsOrDesignatedRothOrInsurancePremiums) && + Objects.equals(this.netUnrealizedAppreciationInEmployerSecurities, form1099R.netUnrealizedAppreciationInEmployerSecurities) && + Objects.equals(this.distributionCode, form1099R.distributionCode) && + Objects.equals(this.secondDistributionCode, form1099R.secondDistributionCode) && + Objects.equals(this.iraSepSimple, form1099R.iraSepSimple) && + Objects.equals(this.traditionalIraSepSimpleOrRothConversionAmount, form1099R.traditionalIraSepSimpleOrRothConversionAmount) && + Objects.equals(this.otherAmount, form1099R.otherAmount) && + Objects.equals(this.otherPercentage, form1099R.otherPercentage) && + Objects.equals(this.totalDistributionPercentage, form1099R.totalDistributionPercentage) && Objects.equals(this.totalEmployeeContributions, form1099R.totalEmployeeContributions) && - Objects.equals(this.amountAllocableToIrr, form1099R.amountAllocableToIrr) && - Objects.equals(this.firstYearDesignatedRothContrib, form1099R.firstYearDesignatedRothContrib) && + Objects.equals(this.amountAllocableToIrrWithin5Years, form1099R.amountAllocableToIrrWithin5Years) && + Objects.equals(this.firstYearOfDesignatedRothContribution, form1099R.firstYearOfDesignatedRothContribution) && Objects.equals(this.dateOfPayment, form1099R.dateOfPayment) && - Objects.equals(this.id, form1099R.id) && + Objects.equals(this.fatcaFilingRequirement, form1099R.fatcaFilingRequirement) && Objects.equals(this.type, form1099R.type) && + Objects.equals(this.id, form1099R.id) && Objects.equals(this.issuerId, form1099R.issuerId) && Objects.equals(this.issuerReferenceId, form1099R.issuerReferenceId) && Objects.equals(this.issuerTin, form1099R.issuerTin) && Objects.equals(this.taxYear, form1099R.taxYear) && - Objects.equals(this.federalEfile, form1099R.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099R.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099R.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099R.stateEfileStatus) && - Objects.equals(this.postalMail, form1099R.postalMail) && - Objects.equals(this.postalMailStatus, form1099R.postalMailStatus) && - Objects.equals(this.tinMatch, form1099R.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099R.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099R.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099R.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099R.eDeliveryStatus) && Objects.equals(this.referenceId, form1099R.referenceId) && - Objects.equals(this.email, form1099R.email) && - Objects.equals(this.tinType, form1099R.tinType) && - Objects.equals(this.fatcaFilingRequirement, form1099R.fatcaFilingRequirement) && Objects.equals(this.tin, form1099R.tin) && - Objects.equals(this.noTin, form1099R.noTin) && - Objects.equals(this.secondTinNotice, form1099R.secondTinNotice) && Objects.equals(this.recipientName, form1099R.recipientName) && + Objects.equals(this.tinType, form1099R.tinType) && Objects.equals(this.recipientSecondName, form1099R.recipientSecondName) && Objects.equals(this.address, form1099R.address) && Objects.equals(this.address2, form1099R.address2) && Objects.equals(this.city, form1099R.city) && Objects.equals(this.state, form1099R.state) && Objects.equals(this.zip, form1099R.zip) && - Objects.equals(this.nonUsProvince, form1099R.nonUsProvince) && - Objects.equals(this.countryCode, form1099R.countryCode) && + Objects.equals(this.email, form1099R.email) && Objects.equals(this.accountNumber, form1099R.accountNumber) && Objects.equals(this.officeCode, form1099R.officeCode) && + Objects.equals(this.nonUsProvince, form1099R.nonUsProvince) && + Objects.equals(this.countryCode, form1099R.countryCode) && + Objects.equals(this.federalEfileDate, form1099R.federalEfileDate) && + Objects.equals(this.postalMail, form1099R.postalMail) && + Objects.equals(this.stateEfileDate, form1099R.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099R.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099R.tinMatch) && + Objects.equals(this.noTin, form1099R.noTin) && + Objects.equals(this.addressVerification, form1099R.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099R.stateAndLocalWithholding) && + Objects.equals(this.secondTinNotice, form1099R.secondTinNotice) && + Objects.equals(this.federalEfileStatus, form1099R.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099R.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099R.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099R.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099R.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099R.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099R.validationErrors) && Objects.equals(this.createdAt, form1099R.createdAt) && - Objects.equals(this.updatedAt, form1099R.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099R.stateAndLocalWithholding); + Objects.equals(this.updatedAt, form1099R.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -1494,7 +1572,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(grossDistributions, taxableAmount, taxableAmountNotDetermined, totalDistributionIndicator, capitalGain, fedIncomeTaxWithheld, employeeContributions, netUnrealizedAppreciation, distributionCodeRequired, distributionCodeOptional, iraSepSimpleIndicator, totalIraSepSimpleDistribution, other, otherPercent, percentageTotalDistribution, totalEmployeeContributions, amountAllocableToIrr, firstYearDesignatedRothContrib, dateOfPayment, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, fatcaFilingRequirement, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); + return Objects.hash(grossDistribution, taxableAmount, taxableAmountNotDetermined, totalDistributionDetermined, capitalGain, federalIncomeTaxWithheld, employeeContributionsOrDesignatedRothOrInsurancePremiums, netUnrealizedAppreciationInEmployerSecurities, distributionCode, secondDistributionCode, iraSepSimple, traditionalIraSepSimpleOrRothConversionAmount, otherAmount, otherPercentage, totalDistributionPercentage, totalEmployeeContributions, amountAllocableToIrrWithin5Years, firstYearOfDesignatedRothContribution, dateOfPayment, fatcaFilingRequirement, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -1508,64 +1586,65 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Form1099R {\n"); - sb.append(" grossDistributions: ").append(toIndentedString(grossDistributions)).append("\n"); + sb.append(" grossDistribution: ").append(toIndentedString(grossDistribution)).append("\n"); sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n"); sb.append(" taxableAmountNotDetermined: ").append(toIndentedString(taxableAmountNotDetermined)).append("\n"); - sb.append(" totalDistributionIndicator: ").append(toIndentedString(totalDistributionIndicator)).append("\n"); + sb.append(" totalDistributionDetermined: ").append(toIndentedString(totalDistributionDetermined)).append("\n"); sb.append(" capitalGain: ").append(toIndentedString(capitalGain)).append("\n"); - sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); - sb.append(" employeeContributions: ").append(toIndentedString(employeeContributions)).append("\n"); - sb.append(" netUnrealizedAppreciation: ").append(toIndentedString(netUnrealizedAppreciation)).append("\n"); - sb.append(" distributionCodeRequired: ").append(toIndentedString(distributionCodeRequired)).append("\n"); - sb.append(" distributionCodeOptional: ").append(toIndentedString(distributionCodeOptional)).append("\n"); - sb.append(" iraSepSimpleIndicator: ").append(toIndentedString(iraSepSimpleIndicator)).append("\n"); - sb.append(" totalIraSepSimpleDistribution: ").append(toIndentedString(totalIraSepSimpleDistribution)).append("\n"); - sb.append(" other: ").append(toIndentedString(other)).append("\n"); - sb.append(" otherPercent: ").append(toIndentedString(otherPercent)).append("\n"); - sb.append(" percentageTotalDistribution: ").append(toIndentedString(percentageTotalDistribution)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" employeeContributionsOrDesignatedRothOrInsurancePremiums: ").append(toIndentedString(employeeContributionsOrDesignatedRothOrInsurancePremiums)).append("\n"); + sb.append(" netUnrealizedAppreciationInEmployerSecurities: ").append(toIndentedString(netUnrealizedAppreciationInEmployerSecurities)).append("\n"); + sb.append(" distributionCode: ").append(toIndentedString(distributionCode)).append("\n"); + sb.append(" secondDistributionCode: ").append(toIndentedString(secondDistributionCode)).append("\n"); + sb.append(" iraSepSimple: ").append(toIndentedString(iraSepSimple)).append("\n"); + sb.append(" traditionalIraSepSimpleOrRothConversionAmount: ").append(toIndentedString(traditionalIraSepSimpleOrRothConversionAmount)).append("\n"); + sb.append(" otherAmount: ").append(toIndentedString(otherAmount)).append("\n"); + sb.append(" otherPercentage: ").append(toIndentedString(otherPercentage)).append("\n"); + sb.append(" totalDistributionPercentage: ").append(toIndentedString(totalDistributionPercentage)).append("\n"); sb.append(" totalEmployeeContributions: ").append(toIndentedString(totalEmployeeContributions)).append("\n"); - sb.append(" amountAllocableToIrr: ").append(toIndentedString(amountAllocableToIrr)).append("\n"); - sb.append(" firstYearDesignatedRothContrib: ").append(toIndentedString(firstYearDesignatedRothContrib)).append("\n"); + sb.append(" amountAllocableToIrrWithin5Years: ").append(toIndentedString(amountAllocableToIrrWithin5Years)).append("\n"); + sb.append(" firstYearOfDesignatedRothContribution: ").append(toIndentedString(firstYearOfDesignatedRothContribution)).append("\n"); sb.append(" dateOfPayment: ").append(toIndentedString(dateOfPayment)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); sb.append("}"); return sb.toString(); } @@ -1588,48 +1667,53 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("id"); openapiFields.add("type"); + openapiFields.add("id"); openapiFields.add("issuerId"); openapiFields.add("issuerReferenceId"); openapiFields.add("issuerTin"); openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("fatcaFilingRequirement"); openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); openapiFields.add("recipientName"); + openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); + openapiFields.add("email"); openapiFields.add("accountNumber"); openapiFields.add("officeCode"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("noTin"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("secondTinNotice"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); openapiFields.add("validationErrors"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1652,30 +1736,39 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099R` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099R.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("distributionCodeRequired") != null && !jsonObj.get("distributionCodeRequired").isJsonNull()) && !jsonObj.get("distributionCodeRequired").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `distributionCodeRequired` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCodeRequired").toString())); + if ((jsonObj.get("distributionCode") != null && !jsonObj.get("distributionCode").isJsonNull()) && !jsonObj.get("distributionCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `distributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCode").toString())); } - if ((jsonObj.get("distributionCodeOptional") != null && !jsonObj.get("distributionCodeOptional").isJsonNull()) && !jsonObj.get("distributionCodeOptional").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `distributionCodeOptional` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCodeOptional").toString())); + if ((jsonObj.get("secondDistributionCode") != null && !jsonObj.get("secondDistributionCode").isJsonNull()) && !jsonObj.get("secondDistributionCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `secondDistributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondDistributionCode").toString())); } - if ((jsonObj.get("otherPercent") != null && !jsonObj.get("otherPercent").isJsonNull()) && !jsonObj.get("otherPercent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `otherPercent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("otherPercent").toString())); + if ((jsonObj.get("otherPercentage") != null && !jsonObj.get("otherPercentage").isJsonNull()) && !jsonObj.get("otherPercentage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `otherPercentage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("otherPercentage").toString())); } - if ((jsonObj.get("percentageTotalDistribution") != null && !jsonObj.get("percentageTotalDistribution").isJsonNull()) && !jsonObj.get("percentageTotalDistribution").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `percentageTotalDistribution` to be a primitive type in the JSON string but got `%s`", jsonObj.get("percentageTotalDistribution").toString())); + if ((jsonObj.get("totalDistributionPercentage") != null && !jsonObj.get("totalDistributionPercentage").isJsonNull()) && !jsonObj.get("totalDistributionPercentage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `totalDistributionPercentage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalDistributionPercentage").toString())); } - if ((jsonObj.get("firstYearDesignatedRothContrib") != null && !jsonObj.get("firstYearDesignatedRothContrib").isJsonNull()) && !jsonObj.get("firstYearDesignatedRothContrib").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `firstYearDesignatedRothContrib` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstYearDesignatedRothContrib").toString())); + if ((jsonObj.get("firstYearOfDesignatedRothContribution") != null && !jsonObj.get("firstYearOfDesignatedRothContribution").isJsonNull()) && !jsonObj.get("firstYearOfDesignatedRothContribution").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstYearOfDesignatedRothContribution` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstYearOfDesignatedRothContribution").toString())); } - if ((jsonObj.get("dateOfPayment") != null && !jsonObj.get("dateOfPayment").isJsonNull()) && !jsonObj.get("dateOfPayment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dateOfPayment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dateOfPayment").toString())); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); } if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); @@ -1683,55 +1776,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } @@ -1750,17 +1810,58 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); @@ -1776,10 +1877,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RList.java deleted file mode 100644 index 26ca5ad..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RList.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1099RListItem; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099RList - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099RList { - public static final String SERIALIZED_NAME_FORMS = "forms"; - @SerializedName(SERIALIZED_NAME_FORMS) - private List forms; - - public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; - @SerializedName(SERIALIZED_NAME_FORM_TYPE) - private String formType; - - public Form1099RList() { - } - - public Form1099RList forms(List forms) { - this.forms = forms; - return this; - } - - public Form1099RList addFormsItem(Form1099RListItem formsItem) { - if (this.forms == null) { - this.forms = new ArrayList<>(); - } - this.forms.add(formsItem); - return this; - } - - /** - * Get forms - * @return forms - */ - @javax.annotation.Nullable - public List getForms() { - return forms; - } - - public void setForms(List forms) { - this.forms = forms; - } - - - public Form1099RList formType(String formType) { - this.formType = formType; - return this; - } - - /** - * Get formType - * @return formType - */ - @javax.annotation.Nullable - public String getFormType() { - return formType; - } - - public void setFormType(String formType) { - this.formType = formType; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099RList form1099RList = (Form1099RList) o; - return Objects.equals(this.forms, form1099RList.forms) && - Objects.equals(this.formType, form1099RList.formType); - } - - @Override - public int hashCode() { - return Objects.hash(forms, formType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099RList {\n"); - sb.append(" forms: ").append(toIndentedString(forms)).append("\n"); - sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("formType"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099RList - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099RList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099RList is not found in the empty JSON string", Form1099RList.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099RList.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099RList` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("forms") != null && !jsonObj.get("forms").isJsonNull()) { - JsonArray jsonArrayforms = jsonObj.getAsJsonArray("forms"); - if (jsonArrayforms != null) { - // ensure the json data is an array - if (!jsonObj.get("forms").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `forms` to be an array in the JSON string but got `%s`", jsonObj.get("forms").toString())); - } - - // validate the optional field `forms` (array) - for (int i = 0; i < jsonArrayforms.size(); i++) { - Form1099RListItem.validateJsonElement(jsonArrayforms.get(i)); - }; - } - } - if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099RList.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099RList' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099RList.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099RList value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099RList read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099RList given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099RList - * @throws IOException if the JSON string is invalid with respect to Form1099RList - */ - public static Form1099RList fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099RList.class); - } - - /** - * Convert an instance of Form1099RList to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItem.java deleted file mode 100644 index 488da4e..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItem.java +++ /dev/null @@ -1,1758 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099RListItem - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099RListItem { - public static final String SERIALIZED_NAME_GROSS_DISTRIBUTION = "grossDistribution"; - @SerializedName(SERIALIZED_NAME_GROSS_DISTRIBUTION) - private Double grossDistribution; - - public static final String SERIALIZED_NAME_TAXABLE_AMOUNT = "taxableAmount"; - @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT) - private Double taxableAmount; - - public static final String SERIALIZED_NAME_TAXABLE_AMOUNT_NOT_DETERMINED = "taxableAmountNotDetermined"; - @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT_NOT_DETERMINED) - private Boolean taxableAmountNotDetermined; - - public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_DETERMINED = "totalDistributionDetermined"; - @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_DETERMINED) - private Boolean totalDistributionDetermined; - - public static final String SERIALIZED_NAME_CAPITAL_GAIN = "capitalGain"; - @SerializedName(SERIALIZED_NAME_CAPITAL_GAIN) - private Double capitalGain; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS_OR_DESIGNATED_ROTH_OR_INSURANCE_PREMIUMS = "employeeContributionsOrDesignatedRothOrInsurancePremiums"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS_OR_DESIGNATED_ROTH_OR_INSURANCE_PREMIUMS) - private Double employeeContributionsOrDesignatedRothOrInsurancePremiums; - - public static final String SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION_IN_EMPLOYER_SECURITIES = "netUnrealizedAppreciationInEmployerSecurities"; - @SerializedName(SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION_IN_EMPLOYER_SECURITIES) - private Double netUnrealizedAppreciationInEmployerSecurities; - - /** - * Distribution code - */ - @JsonAdapter(DistributionCodeEnum.Adapter.class) - public enum DistributionCodeEnum { - _1("1"), - - _2("2"), - - _3("3"), - - _4("4"), - - _5("5"), - - _6("6"), - - _7("7"), - - _8("8"), - - _9("9"), - - A("A"), - - B("B"), - - C("C"), - - D("D"), - - E("E"), - - F("F"), - - G("G"), - - H("H"), - - J("J"), - - K("K"), - - L("L"), - - M("M"), - - N("N"), - - P("P"), - - Q("Q"), - - R("R"), - - S("S"), - - T("T"), - - U("U"), - - W("W"); - - private String value; - - DistributionCodeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static DistributionCodeEnum fromValue(String value) { - for (DistributionCodeEnum b : DistributionCodeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final DistributionCodeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public DistributionCodeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return DistributionCodeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - DistributionCodeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_DISTRIBUTION_CODE = "distributionCode"; - @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE) - private DistributionCodeEnum distributionCode; - - /** - * Second distribution code - */ - @JsonAdapter(SecondDistributionCodeEnum.Adapter.class) - public enum SecondDistributionCodeEnum { - EARLY_DISTRIBUTION_NO_EXCEPTION("EarlyDistributionNoException"), - - EARLY_DISTRIBUTION_WITH_EXCEPTION("EarlyDistributionWithException"), - - DISABILITY("Disability"), - - DEATH("Death"), - - PROHIBITED_TRANSACTION("ProhibitedTransaction"), - - SECTION1035_EXCHANGE("Section1035Exchange"), - - NORMAL_DISTRIBUTION("NormalDistribution"), - - EXCESS_CONTRIBUTIONS_CURRENT_YEAR("ExcessContributionsCurrentYear"), - - CURRENT_LIFE_INSURANCE_PROTECTION_COST("CurrentLifeInsuranceProtectionCost"), - - TEN_YEAR_TAX_OPTION("TenYearTaxOption"), - - DESIGNATED_ROTH_DISTRIBUTION("DesignatedRothDistribution"), - - REPORTABLE_DEATH_BENEFITS("ReportableDeathBenefits"), - - NONQUALIFIED_ANNUITY_PAYMENTS("NonqualifiedAnnuityPayments"), - - EPCRS_DISTRIBUTION("EPCRSDistribution"), - - CHARITABLE_GIFT_ANNUITY("CharitableGiftAnnuity"), - - DIRECT_ROLLOVER("DirectRollover"), - - ROTH_ACCOUNT_TO_IRA_DIRECT_ROLLOVER("RothAccountToIRADirectRollover"), - - EARLY_ROTH_IRA_DISTRIBUTION("EarlyRothIRADistribution"), - - IRA_ASSETS_NO_FMV("IRAAssetsNoFMV"), - - LOANS_DEEMED_DISTRIBUTIONS("LoansDeemedDistributions"), - - QUALIFIED_PLAN_LOAN_OFFSETS("QualifiedPlanLoanOffsets"), - - RECHARACTERIZED_IRA_NEXT_YEAR("RecharacterizedIRANextYear"), - - EXCESS_CONTRIBUTIONS_PREVIOUS_YEAR("ExcessContributionsPreviousYear"), - - QUALIFIED_ROTH_IRA_DISTRIBUTION("QualifiedRothIRADistribution"), - - RECHARACTERIZED_IRA_PREVIOUS_YEAR("RecharacterizedIRAPreviousYear"), - - EARLY_SIMPLE_IRA_DISTRIBUTION("EarlySimpleIRADistribution"), - - ROTH_IRA_DISTRIBUTION_EXCEPTION("RothIRADistributionException"), - - ESOP_DISTRIBUTION("ESOPDistribution"), - - LONG_TERM_CARE_INSURANCE("LongTermCareInsurance"); - - private String value; - - SecondDistributionCodeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static SecondDistributionCodeEnum fromValue(String value) { - for (SecondDistributionCodeEnum b : SecondDistributionCodeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final SecondDistributionCodeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public SecondDistributionCodeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return SecondDistributionCodeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - SecondDistributionCodeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE = "secondDistributionCode"; - @SerializedName(SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE) - private SecondDistributionCodeEnum secondDistributionCode; - - public static final String SERIALIZED_NAME_IRA_SEP_SIMPLE = "iraSepSimple"; - @SerializedName(SERIALIZED_NAME_IRA_SEP_SIMPLE) - private Boolean iraSepSimple; - - public static final String SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT = "traditionalIraSepSimpleOrRothConversionAmount"; - @SerializedName(SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT) - private Double traditionalIraSepSimpleOrRothConversionAmount; - - public static final String SERIALIZED_NAME_OTHER_AMOUNT = "otherAmount"; - @SerializedName(SERIALIZED_NAME_OTHER_AMOUNT) - private Double otherAmount; - - public static final String SERIALIZED_NAME_OTHER_PERCENTAGE = "otherPercentage"; - @SerializedName(SERIALIZED_NAME_OTHER_PERCENTAGE) - private String otherPercentage; - - public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_PERCENTAGE = "totalDistributionPercentage"; - @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_PERCENTAGE) - private String totalDistributionPercentage; - - public static final String SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS = "totalEmployeeContributions"; - @SerializedName(SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS) - private Double totalEmployeeContributions; - - public static final String SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR_WITHIN5_YEARS = "amountAllocableToIrrWithin5Years"; - @SerializedName(SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR_WITHIN5_YEARS) - private Double amountAllocableToIrrWithin5Years; - - public static final String SERIALIZED_NAME_FIRST_YEAR_OF_DESIGNATED_ROTH_CONTRIBUTION = "firstYearOfDesignatedRothContribution"; - @SerializedName(SERIALIZED_NAME_FIRST_YEAR_OF_DESIGNATED_ROTH_CONTRIBUTION) - private Integer firstYearOfDesignatedRothContribution; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_DATE_OF_PAYMENT = "dateOfPayment"; - @SerializedName(SERIALIZED_NAME_DATE_OF_PAYMENT) - private OffsetDateTime dateOfPayment; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099RListItem() { - } - - public Form1099RListItem grossDistribution(Double grossDistribution) { - this.grossDistribution = grossDistribution; - return this; - } - - /** - * Gross distribution - * @return grossDistribution - */ - @javax.annotation.Nullable - public Double getGrossDistribution() { - return grossDistribution; - } - - public void setGrossDistribution(Double grossDistribution) { - this.grossDistribution = grossDistribution; - } - - - public Form1099RListItem taxableAmount(Double taxableAmount) { - this.taxableAmount = taxableAmount; - return this; - } - - /** - * Taxable amount - * @return taxableAmount - */ - @javax.annotation.Nullable - public Double getTaxableAmount() { - return taxableAmount; - } - - public void setTaxableAmount(Double taxableAmount) { - this.taxableAmount = taxableAmount; - } - - - public Form1099RListItem taxableAmountNotDetermined(Boolean taxableAmountNotDetermined) { - this.taxableAmountNotDetermined = taxableAmountNotDetermined; - return this; - } - - /** - * Taxable amount not determined - * @return taxableAmountNotDetermined - */ - @javax.annotation.Nullable - public Boolean getTaxableAmountNotDetermined() { - return taxableAmountNotDetermined; - } - - public void setTaxableAmountNotDetermined(Boolean taxableAmountNotDetermined) { - this.taxableAmountNotDetermined = taxableAmountNotDetermined; - } - - - public Form1099RListItem totalDistributionDetermined(Boolean totalDistributionDetermined) { - this.totalDistributionDetermined = totalDistributionDetermined; - return this; - } - - /** - * Total distribution - * @return totalDistributionDetermined - */ - @javax.annotation.Nullable - public Boolean getTotalDistributionDetermined() { - return totalDistributionDetermined; - } - - public void setTotalDistributionDetermined(Boolean totalDistributionDetermined) { - this.totalDistributionDetermined = totalDistributionDetermined; - } - - - public Form1099RListItem capitalGain(Double capitalGain) { - this.capitalGain = capitalGain; - return this; - } - - /** - * Capital gain (included in Box 2a) - * @return capitalGain - */ - @javax.annotation.Nullable - public Double getCapitalGain() { - return capitalGain; - } - - public void setCapitalGain(Double capitalGain) { - this.capitalGain = capitalGain; - } - - - public Form1099RListItem federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099RListItem employeeContributionsOrDesignatedRothOrInsurancePremiums(Double employeeContributionsOrDesignatedRothOrInsurancePremiums) { - this.employeeContributionsOrDesignatedRothOrInsurancePremiums = employeeContributionsOrDesignatedRothOrInsurancePremiums; - return this; - } - - /** - * Employee contributions/Designated Roth contributions or insurance premiums - * @return employeeContributionsOrDesignatedRothOrInsurancePremiums - */ - @javax.annotation.Nullable - public Double getEmployeeContributionsOrDesignatedRothOrInsurancePremiums() { - return employeeContributionsOrDesignatedRothOrInsurancePremiums; - } - - public void setEmployeeContributionsOrDesignatedRothOrInsurancePremiums(Double employeeContributionsOrDesignatedRothOrInsurancePremiums) { - this.employeeContributionsOrDesignatedRothOrInsurancePremiums = employeeContributionsOrDesignatedRothOrInsurancePremiums; - } - - - public Form1099RListItem netUnrealizedAppreciationInEmployerSecurities(Double netUnrealizedAppreciationInEmployerSecurities) { - this.netUnrealizedAppreciationInEmployerSecurities = netUnrealizedAppreciationInEmployerSecurities; - return this; - } - - /** - * Net unrealized appreciation in employer's securities - * @return netUnrealizedAppreciationInEmployerSecurities - */ - @javax.annotation.Nullable - public Double getNetUnrealizedAppreciationInEmployerSecurities() { - return netUnrealizedAppreciationInEmployerSecurities; - } - - public void setNetUnrealizedAppreciationInEmployerSecurities(Double netUnrealizedAppreciationInEmployerSecurities) { - this.netUnrealizedAppreciationInEmployerSecurities = netUnrealizedAppreciationInEmployerSecurities; - } - - - public Form1099RListItem distributionCode(DistributionCodeEnum distributionCode) { - this.distributionCode = distributionCode; - return this; - } - - /** - * Distribution code - * @return distributionCode - */ - @javax.annotation.Nullable - public DistributionCodeEnum getDistributionCode() { - return distributionCode; - } - - public void setDistributionCode(DistributionCodeEnum distributionCode) { - this.distributionCode = distributionCode; - } - - - public Form1099RListItem secondDistributionCode(SecondDistributionCodeEnum secondDistributionCode) { - this.secondDistributionCode = secondDistributionCode; - return this; - } - - /** - * Second distribution code - * @return secondDistributionCode - */ - @javax.annotation.Nullable - public SecondDistributionCodeEnum getSecondDistributionCode() { - return secondDistributionCode; - } - - public void setSecondDistributionCode(SecondDistributionCodeEnum secondDistributionCode) { - this.secondDistributionCode = secondDistributionCode; - } - - - public Form1099RListItem iraSepSimple(Boolean iraSepSimple) { - this.iraSepSimple = iraSepSimple; - return this; - } - - /** - * IRA/SEP/SIMPLE - * @return iraSepSimple - */ - @javax.annotation.Nullable - public Boolean getIraSepSimple() { - return iraSepSimple; - } - - public void setIraSepSimple(Boolean iraSepSimple) { - this.iraSepSimple = iraSepSimple; - } - - - public Form1099RListItem traditionalIraSepSimpleOrRothConversionAmount(Double traditionalIraSepSimpleOrRothConversionAmount) { - this.traditionalIraSepSimpleOrRothConversionAmount = traditionalIraSepSimpleOrRothConversionAmount; - return this; - } - - /** - * Traditional IRA/SEP/SIMPLE or Roth conversion amount - * @return traditionalIraSepSimpleOrRothConversionAmount - */ - @javax.annotation.Nullable - public Double getTraditionalIraSepSimpleOrRothConversionAmount() { - return traditionalIraSepSimpleOrRothConversionAmount; - } - - public void setTraditionalIraSepSimpleOrRothConversionAmount(Double traditionalIraSepSimpleOrRothConversionAmount) { - this.traditionalIraSepSimpleOrRothConversionAmount = traditionalIraSepSimpleOrRothConversionAmount; - } - - - public Form1099RListItem otherAmount(Double otherAmount) { - this.otherAmount = otherAmount; - return this; - } - - /** - * Other amount - * @return otherAmount - */ - @javax.annotation.Nullable - public Double getOtherAmount() { - return otherAmount; - } - - public void setOtherAmount(Double otherAmount) { - this.otherAmount = otherAmount; - } - - - public Form1099RListItem otherPercentage(String otherPercentage) { - this.otherPercentage = otherPercentage; - return this; - } - - /** - * Other percentage - * @return otherPercentage - */ - @javax.annotation.Nullable - public String getOtherPercentage() { - return otherPercentage; - } - - public void setOtherPercentage(String otherPercentage) { - this.otherPercentage = otherPercentage; - } - - - public Form1099RListItem totalDistributionPercentage(String totalDistributionPercentage) { - this.totalDistributionPercentage = totalDistributionPercentage; - return this; - } - - /** - * Total distribution percentage - * @return totalDistributionPercentage - */ - @javax.annotation.Nullable - public String getTotalDistributionPercentage() { - return totalDistributionPercentage; - } - - public void setTotalDistributionPercentage(String totalDistributionPercentage) { - this.totalDistributionPercentage = totalDistributionPercentage; - } - - - public Form1099RListItem totalEmployeeContributions(Double totalEmployeeContributions) { - this.totalEmployeeContributions = totalEmployeeContributions; - return this; - } - - /** - * Total employee contributions - * @return totalEmployeeContributions - */ - @javax.annotation.Nullable - public Double getTotalEmployeeContributions() { - return totalEmployeeContributions; - } - - public void setTotalEmployeeContributions(Double totalEmployeeContributions) { - this.totalEmployeeContributions = totalEmployeeContributions; - } - - - public Form1099RListItem amountAllocableToIrrWithin5Years(Double amountAllocableToIrrWithin5Years) { - this.amountAllocableToIrrWithin5Years = amountAllocableToIrrWithin5Years; - return this; - } - - /** - * Amount allocable to IRR within 5 years - * @return amountAllocableToIrrWithin5Years - */ - @javax.annotation.Nullable - public Double getAmountAllocableToIrrWithin5Years() { - return amountAllocableToIrrWithin5Years; - } - - public void setAmountAllocableToIrrWithin5Years(Double amountAllocableToIrrWithin5Years) { - this.amountAllocableToIrrWithin5Years = amountAllocableToIrrWithin5Years; - } - - - public Form1099RListItem firstYearOfDesignatedRothContribution(Integer firstYearOfDesignatedRothContribution) { - this.firstYearOfDesignatedRothContribution = firstYearOfDesignatedRothContribution; - return this; - } - - /** - * First year of designated Roth contribution - * @return firstYearOfDesignatedRothContribution - */ - @javax.annotation.Nullable - public Integer getFirstYearOfDesignatedRothContribution() { - return firstYearOfDesignatedRothContribution; - } - - public void setFirstYearOfDesignatedRothContribution(Integer firstYearOfDesignatedRothContribution) { - this.firstYearOfDesignatedRothContribution = firstYearOfDesignatedRothContribution; - } - - - public Form1099RListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099RListItem dateOfPayment(OffsetDateTime dateOfPayment) { - this.dateOfPayment = dateOfPayment; - return this; - } - - /** - * Date of payment - * @return dateOfPayment - */ - @javax.annotation.Nullable - public OffsetDateTime getDateOfPayment() { - return dateOfPayment; - } - - public void setDateOfPayment(OffsetDateTime dateOfPayment) { - this.dateOfPayment = dateOfPayment; - } - - - public Form1099RListItem issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099RListItem issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099RListItem taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nonnull - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099RListItem issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099RListItem referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099RListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099RListItem recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099RListItem tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099RListItem recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099RListItem address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099RListItem address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099RListItem city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099RListItem state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099RListItem zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099RListItem email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099RListItem accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099RListItem officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099RListItem nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099RListItem countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099RListItem federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099RListItem postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099RListItem stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099RListItem tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099RListItem noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099RListItem secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099RListItem addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099RListItem stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099RListItem form1099RListItem = (Form1099RListItem) o; - return Objects.equals(this.grossDistribution, form1099RListItem.grossDistribution) && - Objects.equals(this.taxableAmount, form1099RListItem.taxableAmount) && - Objects.equals(this.taxableAmountNotDetermined, form1099RListItem.taxableAmountNotDetermined) && - Objects.equals(this.totalDistributionDetermined, form1099RListItem.totalDistributionDetermined) && - Objects.equals(this.capitalGain, form1099RListItem.capitalGain) && - Objects.equals(this.federalIncomeTaxWithheld, form1099RListItem.federalIncomeTaxWithheld) && - Objects.equals(this.employeeContributionsOrDesignatedRothOrInsurancePremiums, form1099RListItem.employeeContributionsOrDesignatedRothOrInsurancePremiums) && - Objects.equals(this.netUnrealizedAppreciationInEmployerSecurities, form1099RListItem.netUnrealizedAppreciationInEmployerSecurities) && - Objects.equals(this.distributionCode, form1099RListItem.distributionCode) && - Objects.equals(this.secondDistributionCode, form1099RListItem.secondDistributionCode) && - Objects.equals(this.iraSepSimple, form1099RListItem.iraSepSimple) && - Objects.equals(this.traditionalIraSepSimpleOrRothConversionAmount, form1099RListItem.traditionalIraSepSimpleOrRothConversionAmount) && - Objects.equals(this.otherAmount, form1099RListItem.otherAmount) && - Objects.equals(this.otherPercentage, form1099RListItem.otherPercentage) && - Objects.equals(this.totalDistributionPercentage, form1099RListItem.totalDistributionPercentage) && - Objects.equals(this.totalEmployeeContributions, form1099RListItem.totalEmployeeContributions) && - Objects.equals(this.amountAllocableToIrrWithin5Years, form1099RListItem.amountAllocableToIrrWithin5Years) && - Objects.equals(this.firstYearOfDesignatedRothContribution, form1099RListItem.firstYearOfDesignatedRothContribution) && - Objects.equals(this.fatcaFilingRequirement, form1099RListItem.fatcaFilingRequirement) && - Objects.equals(this.dateOfPayment, form1099RListItem.dateOfPayment) && - Objects.equals(this.issuerReferenceId, form1099RListItem.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099RListItem.issuerTin) && - Objects.equals(this.taxYear, form1099RListItem.taxYear) && - Objects.equals(this.issuerId, form1099RListItem.issuerId) && - Objects.equals(this.referenceId, form1099RListItem.referenceId) && - Objects.equals(this.recipientTin, form1099RListItem.recipientTin) && - Objects.equals(this.recipientName, form1099RListItem.recipientName) && - Objects.equals(this.tinType, form1099RListItem.tinType) && - Objects.equals(this.recipientSecondName, form1099RListItem.recipientSecondName) && - Objects.equals(this.address, form1099RListItem.address) && - Objects.equals(this.address2, form1099RListItem.address2) && - Objects.equals(this.city, form1099RListItem.city) && - Objects.equals(this.state, form1099RListItem.state) && - Objects.equals(this.zip, form1099RListItem.zip) && - Objects.equals(this.email, form1099RListItem.email) && - Objects.equals(this.accountNumber, form1099RListItem.accountNumber) && - Objects.equals(this.officeCode, form1099RListItem.officeCode) && - Objects.equals(this.nonUsProvince, form1099RListItem.nonUsProvince) && - Objects.equals(this.countryCode, form1099RListItem.countryCode) && - Objects.equals(this.federalEFile, form1099RListItem.federalEFile) && - Objects.equals(this.postalMail, form1099RListItem.postalMail) && - Objects.equals(this.stateEFile, form1099RListItem.stateEFile) && - Objects.equals(this.tinMatch, form1099RListItem.tinMatch) && - Objects.equals(this.noTin, form1099RListItem.noTin) && - Objects.equals(this.secondTinNotice, form1099RListItem.secondTinNotice) && - Objects.equals(this.addressVerification, form1099RListItem.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099RListItem.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(grossDistribution, taxableAmount, taxableAmountNotDetermined, totalDistributionDetermined, capitalGain, federalIncomeTaxWithheld, employeeContributionsOrDesignatedRothOrInsurancePremiums, netUnrealizedAppreciationInEmployerSecurities, distributionCode, secondDistributionCode, iraSepSimple, traditionalIraSepSimpleOrRothConversionAmount, otherAmount, otherPercentage, totalDistributionPercentage, totalEmployeeContributions, amountAllocableToIrrWithin5Years, firstYearOfDesignatedRothContribution, fatcaFilingRequirement, dateOfPayment, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099RListItem {\n"); - sb.append(" grossDistribution: ").append(toIndentedString(grossDistribution)).append("\n"); - sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n"); - sb.append(" taxableAmountNotDetermined: ").append(toIndentedString(taxableAmountNotDetermined)).append("\n"); - sb.append(" totalDistributionDetermined: ").append(toIndentedString(totalDistributionDetermined)).append("\n"); - sb.append(" capitalGain: ").append(toIndentedString(capitalGain)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" employeeContributionsOrDesignatedRothOrInsurancePremiums: ").append(toIndentedString(employeeContributionsOrDesignatedRothOrInsurancePremiums)).append("\n"); - sb.append(" netUnrealizedAppreciationInEmployerSecurities: ").append(toIndentedString(netUnrealizedAppreciationInEmployerSecurities)).append("\n"); - sb.append(" distributionCode: ").append(toIndentedString(distributionCode)).append("\n"); - sb.append(" secondDistributionCode: ").append(toIndentedString(secondDistributionCode)).append("\n"); - sb.append(" iraSepSimple: ").append(toIndentedString(iraSepSimple)).append("\n"); - sb.append(" traditionalIraSepSimpleOrRothConversionAmount: ").append(toIndentedString(traditionalIraSepSimpleOrRothConversionAmount)).append("\n"); - sb.append(" otherAmount: ").append(toIndentedString(otherAmount)).append("\n"); - sb.append(" otherPercentage: ").append(toIndentedString(otherPercentage)).append("\n"); - sb.append(" totalDistributionPercentage: ").append(toIndentedString(totalDistributionPercentage)).append("\n"); - sb.append(" totalEmployeeContributions: ").append(toIndentedString(totalEmployeeContributions)).append("\n"); - sb.append(" amountAllocableToIrrWithin5Years: ").append(toIndentedString(amountAllocableToIrrWithin5Years)).append("\n"); - sb.append(" firstYearOfDesignatedRothContribution: ").append(toIndentedString(firstYearOfDesignatedRothContribution)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" dateOfPayment: ").append(toIndentedString(dateOfPayment)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("taxYear"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099RListItem - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099RListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099RListItem is not found in the empty JSON string", Form1099RListItem.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099RListItem.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099RListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099RListItem.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("distributionCode") != null && !jsonObj.get("distributionCode").isJsonNull()) && !jsonObj.get("distributionCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `distributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCode").toString())); - } - // validate the optional field `distributionCode` - if (jsonObj.get("distributionCode") != null && !jsonObj.get("distributionCode").isJsonNull()) { - DistributionCodeEnum.validateJsonElement(jsonObj.get("distributionCode")); - } - if ((jsonObj.get("secondDistributionCode") != null && !jsonObj.get("secondDistributionCode").isJsonNull()) && !jsonObj.get("secondDistributionCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secondDistributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondDistributionCode").toString())); - } - // validate the optional field `secondDistributionCode` - if (jsonObj.get("secondDistributionCode") != null && !jsonObj.get("secondDistributionCode").isJsonNull()) { - SecondDistributionCodeEnum.validateJsonElement(jsonObj.get("secondDistributionCode")); - } - if ((jsonObj.get("otherPercentage") != null && !jsonObj.get("otherPercentage").isJsonNull()) && !jsonObj.get("otherPercentage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `otherPercentage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("otherPercentage").toString())); - } - if ((jsonObj.get("totalDistributionPercentage") != null && !jsonObj.get("totalDistributionPercentage").isJsonNull()) && !jsonObj.get("totalDistributionPercentage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `totalDistributionPercentage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalDistributionPercentage").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099RListItem.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099RListItem' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099RListItem.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099RListItem value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099RListItem read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099RListItem given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099RListItem - * @throws IOException if the JSON string is invalid with respect to Form1099RListItem - */ - public static Form1099RListItem fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099RListItem.class); - } - - /** - * Convert an instance of Form1099RListItem to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItemResponse.java deleted file mode 100644 index fa5db96..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItemResponse.java +++ /dev/null @@ -1,1778 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099RListItemResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099RListItemResponse { - public static final String SERIALIZED_NAME_GROSS_DISTRIBUTIONS = "grossDistributions"; - @SerializedName(SERIALIZED_NAME_GROSS_DISTRIBUTIONS) - private Double grossDistributions; - - public static final String SERIALIZED_NAME_TAXABLE_AMOUNT = "taxableAmount"; - @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT) - private Double taxableAmount; - - public static final String SERIALIZED_NAME_TAXABLE_AMOUNT_NOT_DETERMINED = "taxableAmountNotDetermined"; - @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT_NOT_DETERMINED) - private Boolean taxableAmountNotDetermined; - - public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_INDICATOR = "totalDistributionIndicator"; - @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_INDICATOR) - private Boolean totalDistributionIndicator; - - public static final String SERIALIZED_NAME_CAPITAL_GAIN = "capitalGain"; - @SerializedName(SERIALIZED_NAME_CAPITAL_GAIN) - private Double capitalGain; - - public static final String SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD = "fedIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD) - private Double fedIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS = "employeeContributions"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS) - private Double employeeContributions; - - public static final String SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION = "netUnrealizedAppreciation"; - @SerializedName(SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION) - private Double netUnrealizedAppreciation; - - public static final String SERIALIZED_NAME_DISTRIBUTION_CODE_REQUIRED = "distributionCodeRequired"; - @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE_REQUIRED) - private String distributionCodeRequired; - - public static final String SERIALIZED_NAME_DISTRIBUTION_CODE_OPTIONAL = "distributionCodeOptional"; - @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE_OPTIONAL) - private String distributionCodeOptional; - - public static final String SERIALIZED_NAME_IRA_SEP_SIMPLE_INDICATOR = "iraSepSimpleIndicator"; - @SerializedName(SERIALIZED_NAME_IRA_SEP_SIMPLE_INDICATOR) - private Boolean iraSepSimpleIndicator; - - public static final String SERIALIZED_NAME_TOTAL_IRA_SEP_SIMPLE_DISTRIBUTION = "totalIraSepSimpleDistribution"; - @SerializedName(SERIALIZED_NAME_TOTAL_IRA_SEP_SIMPLE_DISTRIBUTION) - private Double totalIraSepSimpleDistribution; - - public static final String SERIALIZED_NAME_OTHER = "other"; - @SerializedName(SERIALIZED_NAME_OTHER) - private Double other; - - public static final String SERIALIZED_NAME_OTHER_PERCENT = "otherPercent"; - @SerializedName(SERIALIZED_NAME_OTHER_PERCENT) - private String otherPercent; - - public static final String SERIALIZED_NAME_PERCENTAGE_TOTAL_DISTRIBUTION = "percentageTotalDistribution"; - @SerializedName(SERIALIZED_NAME_PERCENTAGE_TOTAL_DISTRIBUTION) - private String percentageTotalDistribution; - - public static final String SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS = "totalEmployeeContributions"; - @SerializedName(SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS) - private Double totalEmployeeContributions; - - public static final String SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR = "amountAllocableToIrr"; - @SerializedName(SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR) - private Double amountAllocableToIrr; - - public static final String SERIALIZED_NAME_FIRST_YEAR_DESIGNATED_ROTH_CONTRIB = "firstYearDesignatedRothContrib"; - @SerializedName(SERIALIZED_NAME_FIRST_YEAR_DESIGNATED_ROTH_CONTRIB) - private String firstYearDesignatedRothContrib; - - public static final String SERIALIZED_NAME_DATE_OF_PAYMENT = "dateOfPayment"; - @SerializedName(SERIALIZED_NAME_DATE_OF_PAYMENT) - private String dateOfPayment; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private Integer issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE = "federalEfile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE) - private Boolean federalEfile; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE = "stateEfile"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE) - private Boolean stateEfile; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private String tinType; - - public static final String SERIALIZED_NAME_TIN = "tin"; - @SerializedName(SERIALIZED_NAME_TIN) - private String tin; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - public Form1099RListItemResponse() { - } - - public Form1099RListItemResponse( - String id, - StatusDetail federalEfileStatus, - List stateEfileStatus, - StatusDetail postalMailStatus, - StatusDetail tinMatchStatus, - StatusDetail addressVerificationStatus, - StatusDetail eDeliveryStatus, - List validationErrors, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); - this.id = id; - this.federalEfileStatus = federalEfileStatus; - this.stateEfileStatus = stateEfileStatus; - this.postalMailStatus = postalMailStatus; - this.tinMatchStatus = tinMatchStatus; - this.addressVerificationStatus = addressVerificationStatus; - this.eDeliveryStatus = eDeliveryStatus; - this.validationErrors = validationErrors; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - public Form1099RListItemResponse grossDistributions(Double grossDistributions) { - this.grossDistributions = grossDistributions; - return this; - } - - /** - * Gross distribution - * @return grossDistributions - */ - @javax.annotation.Nullable - public Double getGrossDistributions() { - return grossDistributions; - } - - public void setGrossDistributions(Double grossDistributions) { - this.grossDistributions = grossDistributions; - } - - - public Form1099RListItemResponse taxableAmount(Double taxableAmount) { - this.taxableAmount = taxableAmount; - return this; - } - - /** - * Taxable amount - * @return taxableAmount - */ - @javax.annotation.Nullable - public Double getTaxableAmount() { - return taxableAmount; - } - - public void setTaxableAmount(Double taxableAmount) { - this.taxableAmount = taxableAmount; - } - - - public Form1099RListItemResponse taxableAmountNotDetermined(Boolean taxableAmountNotDetermined) { - this.taxableAmountNotDetermined = taxableAmountNotDetermined; - return this; - } - - /** - * Taxable amount not determined - * @return taxableAmountNotDetermined - */ - @javax.annotation.Nullable - public Boolean getTaxableAmountNotDetermined() { - return taxableAmountNotDetermined; - } - - public void setTaxableAmountNotDetermined(Boolean taxableAmountNotDetermined) { - this.taxableAmountNotDetermined = taxableAmountNotDetermined; - } - - - public Form1099RListItemResponse totalDistributionIndicator(Boolean totalDistributionIndicator) { - this.totalDistributionIndicator = totalDistributionIndicator; - return this; - } - - /** - * Total distribution - * @return totalDistributionIndicator - */ - @javax.annotation.Nullable - public Boolean getTotalDistributionIndicator() { - return totalDistributionIndicator; - } - - public void setTotalDistributionIndicator(Boolean totalDistributionIndicator) { - this.totalDistributionIndicator = totalDistributionIndicator; - } - - - public Form1099RListItemResponse capitalGain(Double capitalGain) { - this.capitalGain = capitalGain; - return this; - } - - /** - * Capital gain (included in Box 2a) - * @return capitalGain - */ - @javax.annotation.Nullable - public Double getCapitalGain() { - return capitalGain; - } - - public void setCapitalGain(Double capitalGain) { - this.capitalGain = capitalGain; - } - - - public Form1099RListItemResponse fedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return fedIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFedIncomeTaxWithheld() { - return fedIncomeTaxWithheld; - } - - public void setFedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { - this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; - } - - - public Form1099RListItemResponse employeeContributions(Double employeeContributions) { - this.employeeContributions = employeeContributions; - return this; - } - - /** - * Employee contributions/Designated Roth contributions or insurance premiums - * @return employeeContributions - */ - @javax.annotation.Nullable - public Double getEmployeeContributions() { - return employeeContributions; - } - - public void setEmployeeContributions(Double employeeContributions) { - this.employeeContributions = employeeContributions; - } - - - public Form1099RListItemResponse netUnrealizedAppreciation(Double netUnrealizedAppreciation) { - this.netUnrealizedAppreciation = netUnrealizedAppreciation; - return this; - } - - /** - * Net unrealized appreciation in employer's securities - * @return netUnrealizedAppreciation - */ - @javax.annotation.Nullable - public Double getNetUnrealizedAppreciation() { - return netUnrealizedAppreciation; - } - - public void setNetUnrealizedAppreciation(Double netUnrealizedAppreciation) { - this.netUnrealizedAppreciation = netUnrealizedAppreciation; - } - - - public Form1099RListItemResponse distributionCodeRequired(String distributionCodeRequired) { - this.distributionCodeRequired = distributionCodeRequired; - return this; - } - - /** - * Distribution code - * @return distributionCodeRequired - */ - @javax.annotation.Nullable - public String getDistributionCodeRequired() { - return distributionCodeRequired; - } - - public void setDistributionCodeRequired(String distributionCodeRequired) { - this.distributionCodeRequired = distributionCodeRequired; - } - - - public Form1099RListItemResponse distributionCodeOptional(String distributionCodeOptional) { - this.distributionCodeOptional = distributionCodeOptional; - return this; - } - - /** - * Second distribution code - * @return distributionCodeOptional - */ - @javax.annotation.Nullable - public String getDistributionCodeOptional() { - return distributionCodeOptional; - } - - public void setDistributionCodeOptional(String distributionCodeOptional) { - this.distributionCodeOptional = distributionCodeOptional; - } - - - public Form1099RListItemResponse iraSepSimpleIndicator(Boolean iraSepSimpleIndicator) { - this.iraSepSimpleIndicator = iraSepSimpleIndicator; - return this; - } - - /** - * IRA/SEP/SIMPLE - * @return iraSepSimpleIndicator - */ - @javax.annotation.Nullable - public Boolean getIraSepSimpleIndicator() { - return iraSepSimpleIndicator; - } - - public void setIraSepSimpleIndicator(Boolean iraSepSimpleIndicator) { - this.iraSepSimpleIndicator = iraSepSimpleIndicator; - } - - - public Form1099RListItemResponse totalIraSepSimpleDistribution(Double totalIraSepSimpleDistribution) { - this.totalIraSepSimpleDistribution = totalIraSepSimpleDistribution; - return this; - } - - /** - * Traditional IRA/SEP/SIMPLE or Roth conversion amount - * @return totalIraSepSimpleDistribution - */ - @javax.annotation.Nullable - public Double getTotalIraSepSimpleDistribution() { - return totalIraSepSimpleDistribution; - } - - public void setTotalIraSepSimpleDistribution(Double totalIraSepSimpleDistribution) { - this.totalIraSepSimpleDistribution = totalIraSepSimpleDistribution; - } - - - public Form1099RListItemResponse other(Double other) { - this.other = other; - return this; - } - - /** - * Other amount - * @return other - */ - @javax.annotation.Nullable - public Double getOther() { - return other; - } - - public void setOther(Double other) { - this.other = other; - } - - - public Form1099RListItemResponse otherPercent(String otherPercent) { - this.otherPercent = otherPercent; - return this; - } - - /** - * Other percentage - * @return otherPercent - */ - @javax.annotation.Nullable - public String getOtherPercent() { - return otherPercent; - } - - public void setOtherPercent(String otherPercent) { - this.otherPercent = otherPercent; - } - - - public Form1099RListItemResponse percentageTotalDistribution(String percentageTotalDistribution) { - this.percentageTotalDistribution = percentageTotalDistribution; - return this; - } - - /** - * Total distribution percentage - * @return percentageTotalDistribution - */ - @javax.annotation.Nullable - public String getPercentageTotalDistribution() { - return percentageTotalDistribution; - } - - public void setPercentageTotalDistribution(String percentageTotalDistribution) { - this.percentageTotalDistribution = percentageTotalDistribution; - } - - - public Form1099RListItemResponse totalEmployeeContributions(Double totalEmployeeContributions) { - this.totalEmployeeContributions = totalEmployeeContributions; - return this; - } - - /** - * Total employee contributions - * @return totalEmployeeContributions - */ - @javax.annotation.Nullable - public Double getTotalEmployeeContributions() { - return totalEmployeeContributions; - } - - public void setTotalEmployeeContributions(Double totalEmployeeContributions) { - this.totalEmployeeContributions = totalEmployeeContributions; - } - - - public Form1099RListItemResponse amountAllocableToIrr(Double amountAllocableToIrr) { - this.amountAllocableToIrr = amountAllocableToIrr; - return this; - } - - /** - * Amount allocable to IRR within 5 years - * @return amountAllocableToIrr - */ - @javax.annotation.Nullable - public Double getAmountAllocableToIrr() { - return amountAllocableToIrr; - } - - public void setAmountAllocableToIrr(Double amountAllocableToIrr) { - this.amountAllocableToIrr = amountAllocableToIrr; - } - - - public Form1099RListItemResponse firstYearDesignatedRothContrib(String firstYearDesignatedRothContrib) { - this.firstYearDesignatedRothContrib = firstYearDesignatedRothContrib; - return this; - } - - /** - * First year of designated Roth contribution - * @return firstYearDesignatedRothContrib - */ - @javax.annotation.Nullable - public String getFirstYearDesignatedRothContrib() { - return firstYearDesignatedRothContrib; - } - - public void setFirstYearDesignatedRothContrib(String firstYearDesignatedRothContrib) { - this.firstYearDesignatedRothContrib = firstYearDesignatedRothContrib; - } - - - public Form1099RListItemResponse dateOfPayment(String dateOfPayment) { - this.dateOfPayment = dateOfPayment; - return this; - } - - /** - * Date of payment - * @return dateOfPayment - */ - @javax.annotation.Nullable - public String getDateOfPayment() { - return dateOfPayment; - } - - public void setDateOfPayment(String dateOfPayment) { - this.dateOfPayment = dateOfPayment; - } - - - /** - * ID of the form - * @return id - */ - @javax.annotation.Nonnull - public String getId() { - return id; - } - - - - public Form1099RListItemResponse type(String type) { - this.type = type; - return this; - } - - /** - * Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public Form1099RListItemResponse issuerId(Integer issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nonnull - public Integer getIssuerId() { - return issuerId; - } - - public void setIssuerId(Integer issuerId) { - this.issuerId = issuerId; - } - - - public Form1099RListItemResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099RListItemResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099RListItemResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099RListItemResponse federalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - return this; - } - - /** - * Boolean indicating that federal e-filing has been scheduled for this form - * @return federalEfile - */ - @javax.annotation.Nonnull - public Boolean getFederalEfile() { - return federalEfile; - } - - public void setFederalEfile(Boolean federalEfile) { - this.federalEfile = federalEfile; - } - - - /** - * Federal e-file status - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - - - public Form1099RListItemResponse stateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - return this; - } - - /** - * Boolean indicating that state e-filing has been scheduled for this form - * @return stateEfile - */ - @javax.annotation.Nonnull - public Boolean getStateEfile() { - return stateEfile; - } - - public void setStateEfile(Boolean stateEfile) { - this.stateEfile = stateEfile; - } - - - /** - * State e-file status - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - - - public Form1099RListItemResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient has been scheduled for this form - * @return postalMail - */ - @javax.annotation.Nonnull - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - /** - * Postal mail to recipient status - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - - - public Form1099RListItemResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching has been scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nonnull - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - /** - * TIN Match status - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - - - public Form1099RListItemResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification has been scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nonnull - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - /** - * Address verification status - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - - - /** - * EDelivery status - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - - - public Form1099RListItemResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099RListItemResponse email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099RListItemResponse tinType(String tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public String getTinType() { - return tinType; - } - - public void setTinType(String tinType) { - this.tinType = tinType; - } - - - public Form1099RListItemResponse tin(String tin) { - this.tin = tin; - return this; - } - - /** - * Recipient Tax ID Number - * @return tin - */ - @javax.annotation.Nullable - public String getTin() { - return tin; - } - - public void setTin(String tin) { - this.tin = tin; - } - - - public Form1099RListItemResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099RListItemResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second Tin Notice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099RListItemResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099RListItemResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099RListItemResponse address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099RListItemResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099RListItemResponse city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099RListItemResponse state(String state) { - this.state = state; - return this; - } - - /** - * US state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099RListItemResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099RListItemResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099RListItemResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099RListItemResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account Number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099RListItemResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office Code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099RListItemResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - /** - * Validation errors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - - - /** - * Creation time - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - /** - * Update time - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - - public Form1099RListItemResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099RListItemResponse form1099RListItemResponse = (Form1099RListItemResponse) o; - return Objects.equals(this.grossDistributions, form1099RListItemResponse.grossDistributions) && - Objects.equals(this.taxableAmount, form1099RListItemResponse.taxableAmount) && - Objects.equals(this.taxableAmountNotDetermined, form1099RListItemResponse.taxableAmountNotDetermined) && - Objects.equals(this.totalDistributionIndicator, form1099RListItemResponse.totalDistributionIndicator) && - Objects.equals(this.capitalGain, form1099RListItemResponse.capitalGain) && - Objects.equals(this.fedIncomeTaxWithheld, form1099RListItemResponse.fedIncomeTaxWithheld) && - Objects.equals(this.employeeContributions, form1099RListItemResponse.employeeContributions) && - Objects.equals(this.netUnrealizedAppreciation, form1099RListItemResponse.netUnrealizedAppreciation) && - Objects.equals(this.distributionCodeRequired, form1099RListItemResponse.distributionCodeRequired) && - Objects.equals(this.distributionCodeOptional, form1099RListItemResponse.distributionCodeOptional) && - Objects.equals(this.iraSepSimpleIndicator, form1099RListItemResponse.iraSepSimpleIndicator) && - Objects.equals(this.totalIraSepSimpleDistribution, form1099RListItemResponse.totalIraSepSimpleDistribution) && - Objects.equals(this.other, form1099RListItemResponse.other) && - Objects.equals(this.otherPercent, form1099RListItemResponse.otherPercent) && - Objects.equals(this.percentageTotalDistribution, form1099RListItemResponse.percentageTotalDistribution) && - Objects.equals(this.totalEmployeeContributions, form1099RListItemResponse.totalEmployeeContributions) && - Objects.equals(this.amountAllocableToIrr, form1099RListItemResponse.amountAllocableToIrr) && - Objects.equals(this.firstYearDesignatedRothContrib, form1099RListItemResponse.firstYearDesignatedRothContrib) && - Objects.equals(this.dateOfPayment, form1099RListItemResponse.dateOfPayment) && - Objects.equals(this.id, form1099RListItemResponse.id) && - Objects.equals(this.type, form1099RListItemResponse.type) && - Objects.equals(this.issuerId, form1099RListItemResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099RListItemResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099RListItemResponse.issuerTin) && - Objects.equals(this.taxYear, form1099RListItemResponse.taxYear) && - Objects.equals(this.federalEfile, form1099RListItemResponse.federalEfile) && - Objects.equals(this.federalEfileStatus, form1099RListItemResponse.federalEfileStatus) && - Objects.equals(this.stateEfile, form1099RListItemResponse.stateEfile) && - Objects.equals(this.stateEfileStatus, form1099RListItemResponse.stateEfileStatus) && - Objects.equals(this.postalMail, form1099RListItemResponse.postalMail) && - Objects.equals(this.postalMailStatus, form1099RListItemResponse.postalMailStatus) && - Objects.equals(this.tinMatch, form1099RListItemResponse.tinMatch) && - Objects.equals(this.tinMatchStatus, form1099RListItemResponse.tinMatchStatus) && - Objects.equals(this.addressVerification, form1099RListItemResponse.addressVerification) && - Objects.equals(this.addressVerificationStatus, form1099RListItemResponse.addressVerificationStatus) && - Objects.equals(this.eDeliveryStatus, form1099RListItemResponse.eDeliveryStatus) && - Objects.equals(this.referenceId, form1099RListItemResponse.referenceId) && - Objects.equals(this.email, form1099RListItemResponse.email) && - Objects.equals(this.tinType, form1099RListItemResponse.tinType) && - Objects.equals(this.tin, form1099RListItemResponse.tin) && - Objects.equals(this.noTin, form1099RListItemResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099RListItemResponse.secondTinNotice) && - Objects.equals(this.recipientName, form1099RListItemResponse.recipientName) && - Objects.equals(this.recipientSecondName, form1099RListItemResponse.recipientSecondName) && - Objects.equals(this.address, form1099RListItemResponse.address) && - Objects.equals(this.address2, form1099RListItemResponse.address2) && - Objects.equals(this.city, form1099RListItemResponse.city) && - Objects.equals(this.state, form1099RListItemResponse.state) && - Objects.equals(this.zip, form1099RListItemResponse.zip) && - Objects.equals(this.nonUsProvince, form1099RListItemResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099RListItemResponse.countryCode) && - Objects.equals(this.accountNumber, form1099RListItemResponse.accountNumber) && - Objects.equals(this.officeCode, form1099RListItemResponse.officeCode) && - Objects.equals(this.fatcaFilingRequirement, form1099RListItemResponse.fatcaFilingRequirement) && - Objects.equals(this.validationErrors, form1099RListItemResponse.validationErrors) && - Objects.equals(this.createdAt, form1099RListItemResponse.createdAt) && - Objects.equals(this.updatedAt, form1099RListItemResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099RListItemResponse.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(grossDistributions, taxableAmount, taxableAmountNotDetermined, totalDistributionIndicator, capitalGain, fedIncomeTaxWithheld, employeeContributions, netUnrealizedAppreciation, distributionCodeRequired, distributionCodeOptional, iraSepSimpleIndicator, totalIraSepSimpleDistribution, other, otherPercent, percentageTotalDistribution, totalEmployeeContributions, amountAllocableToIrr, firstYearDesignatedRothContrib, dateOfPayment, id, type, issuerId, issuerReferenceId, issuerTin, taxYear, federalEfile, federalEfileStatus, stateEfile, stateEfileStatus, postalMail, postalMailStatus, tinMatch, tinMatchStatus, addressVerification, addressVerificationStatus, eDeliveryStatus, referenceId, email, tinType, tin, noTin, secondTinNotice, recipientName, recipientSecondName, address, address2, city, state, zip, nonUsProvince, countryCode, accountNumber, officeCode, fatcaFilingRequirement, validationErrors, createdAt, updatedAt, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099RListItemResponse {\n"); - sb.append(" grossDistributions: ").append(toIndentedString(grossDistributions)).append("\n"); - sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n"); - sb.append(" taxableAmountNotDetermined: ").append(toIndentedString(taxableAmountNotDetermined)).append("\n"); - sb.append(" totalDistributionIndicator: ").append(toIndentedString(totalDistributionIndicator)).append("\n"); - sb.append(" capitalGain: ").append(toIndentedString(capitalGain)).append("\n"); - sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); - sb.append(" employeeContributions: ").append(toIndentedString(employeeContributions)).append("\n"); - sb.append(" netUnrealizedAppreciation: ").append(toIndentedString(netUnrealizedAppreciation)).append("\n"); - sb.append(" distributionCodeRequired: ").append(toIndentedString(distributionCodeRequired)).append("\n"); - sb.append(" distributionCodeOptional: ").append(toIndentedString(distributionCodeOptional)).append("\n"); - sb.append(" iraSepSimpleIndicator: ").append(toIndentedString(iraSepSimpleIndicator)).append("\n"); - sb.append(" totalIraSepSimpleDistribution: ").append(toIndentedString(totalIraSepSimpleDistribution)).append("\n"); - sb.append(" other: ").append(toIndentedString(other)).append("\n"); - sb.append(" otherPercent: ").append(toIndentedString(otherPercent)).append("\n"); - sb.append(" percentageTotalDistribution: ").append(toIndentedString(percentageTotalDistribution)).append("\n"); - sb.append(" totalEmployeeContributions: ").append(toIndentedString(totalEmployeeContributions)).append("\n"); - sb.append(" amountAllocableToIrr: ").append(toIndentedString(amountAllocableToIrr)).append("\n"); - sb.append(" firstYearDesignatedRothContrib: ").append(toIndentedString(firstYearDesignatedRothContrib)).append("\n"); - sb.append(" dateOfPayment: ").append(toIndentedString(dateOfPayment)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" federalEfile: ").append(toIndentedString(federalEfile)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" stateEfile: ").append(toIndentedString(stateEfile)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("federalEfile"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("stateEfile"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMail"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatch"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerification"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("referenceId"); - openapiFields.add("email"); - openapiFields.add("tinType"); - openapiFields.add("tin"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("recipientName"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("validationErrors"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("issuerId"); - openapiRequiredFields.add("federalEfile"); - openapiRequiredFields.add("stateEfile"); - openapiRequiredFields.add("postalMail"); - openapiRequiredFields.add("tinMatch"); - openapiRequiredFields.add("addressVerification"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099RListItemResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099RListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099RListItemResponse is not found in the empty JSON string", Form1099RListItemResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099RListItemResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099RListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Form1099RListItemResponse.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("distributionCodeRequired") != null && !jsonObj.get("distributionCodeRequired").isJsonNull()) && !jsonObj.get("distributionCodeRequired").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `distributionCodeRequired` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCodeRequired").toString())); - } - if ((jsonObj.get("distributionCodeOptional") != null && !jsonObj.get("distributionCodeOptional").isJsonNull()) && !jsonObj.get("distributionCodeOptional").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `distributionCodeOptional` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCodeOptional").toString())); - } - if ((jsonObj.get("otherPercent") != null && !jsonObj.get("otherPercent").isJsonNull()) && !jsonObj.get("otherPercent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `otherPercent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("otherPercent").toString())); - } - if ((jsonObj.get("percentageTotalDistribution") != null && !jsonObj.get("percentageTotalDistribution").isJsonNull()) && !jsonObj.get("percentageTotalDistribution").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `percentageTotalDistribution` to be a primitive type in the JSON string but got `%s`", jsonObj.get("percentageTotalDistribution").toString())); - } - if ((jsonObj.get("firstYearDesignatedRothContrib") != null && !jsonObj.get("firstYearDesignatedRothContrib").isJsonNull()) && !jsonObj.get("firstYearDesignatedRothContrib").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `firstYearDesignatedRothContrib` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstYearDesignatedRothContrib").toString())); - } - if ((jsonObj.get("dateOfPayment") != null && !jsonObj.get("dateOfPayment").isJsonNull()) && !jsonObj.get("dateOfPayment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dateOfPayment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dateOfPayment").toString())); - } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099RListItemResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099RListItemResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099RListItemResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099RListItemResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099RListItemResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099RListItemResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099RListItemResponse - * @throws IOException if the JSON string is invalid with respect to Form1099RListItemResponse - */ - public static Form1099RListItemResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099RListItemResponse.class); - } - - /** - * Convert an instance of Form1099RListItemResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RRequest.java deleted file mode 100644 index a15c702..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RRequest.java +++ /dev/null @@ -1,1548 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099RRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099RRequest { - public static final String SERIALIZED_NAME_GROSS_DISTRIBUTION = "grossDistribution"; - @SerializedName(SERIALIZED_NAME_GROSS_DISTRIBUTION) - private Double grossDistribution; - - public static final String SERIALIZED_NAME_TAXABLE_AMOUNT = "taxableAmount"; - @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT) - private Double taxableAmount; - - public static final String SERIALIZED_NAME_TAXABLE_AMOUNT_NOT_DETERMINED = "taxableAmountNotDetermined"; - @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT_NOT_DETERMINED) - private Boolean taxableAmountNotDetermined; - - public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_DETERMINED = "totalDistributionDetermined"; - @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_DETERMINED) - private Boolean totalDistributionDetermined; - - public static final String SERIALIZED_NAME_CAPITAL_GAIN = "capitalGain"; - @SerializedName(SERIALIZED_NAME_CAPITAL_GAIN) - private Double capitalGain; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS_OR_DESIGNATED_ROTH_OR_INSURANCE_PREMIUMS = "employeeContributionsOrDesignatedRothOrInsurancePremiums"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS_OR_DESIGNATED_ROTH_OR_INSURANCE_PREMIUMS) - private Double employeeContributionsOrDesignatedRothOrInsurancePremiums; - - public static final String SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION_IN_EMPLOYER_SECURITIES = "netUnrealizedAppreciationInEmployerSecurities"; - @SerializedName(SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION_IN_EMPLOYER_SECURITIES) - private Double netUnrealizedAppreciationInEmployerSecurities; - - public static final String SERIALIZED_NAME_DISTRIBUTION_CODE = "distributionCode"; - @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE) - private String distributionCode; - - public static final String SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE = "secondDistributionCode"; - @SerializedName(SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE) - private String secondDistributionCode; - - public static final String SERIALIZED_NAME_IRA_SEP_SIMPLE = "iraSepSimple"; - @SerializedName(SERIALIZED_NAME_IRA_SEP_SIMPLE) - private Boolean iraSepSimple; - - public static final String SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT = "traditionalIraSepSimpleOrRothConversionAmount"; - @SerializedName(SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT) - private Double traditionalIraSepSimpleOrRothConversionAmount; - - public static final String SERIALIZED_NAME_OTHER_AMOUNT = "otherAmount"; - @SerializedName(SERIALIZED_NAME_OTHER_AMOUNT) - private Double otherAmount; - - public static final String SERIALIZED_NAME_OTHER_PERCENTAGE = "otherPercentage"; - @SerializedName(SERIALIZED_NAME_OTHER_PERCENTAGE) - private String otherPercentage; - - public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_PERCENTAGE = "totalDistributionPercentage"; - @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_PERCENTAGE) - private String totalDistributionPercentage; - - public static final String SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS = "totalEmployeeContributions"; - @SerializedName(SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS) - private Double totalEmployeeContributions; - - public static final String SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR_WITHIN5_YEARS = "amountAllocableToIrrWithin5Years"; - @SerializedName(SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR_WITHIN5_YEARS) - private Double amountAllocableToIrrWithin5Years; - - public static final String SERIALIZED_NAME_FIRST_YEAR_OF_DESIGNATED_ROTH_CONTRIBUTION = "firstYearOfDesignatedRothContribution"; - @SerializedName(SERIALIZED_NAME_FIRST_YEAR_OF_DESIGNATED_ROTH_CONTRIBUTION) - private String firstYearOfDesignatedRothContribution; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_DATE_OF_PAYMENT = "dateOfPayment"; - @SerializedName(SERIALIZED_NAME_DATE_OF_PAYMENT) - private OffsetDateTime dateOfPayment; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public Form1099RRequest() { - } - - public Form1099RRequest grossDistribution(Double grossDistribution) { - this.grossDistribution = grossDistribution; - return this; - } - - /** - * Gross distribution - * @return grossDistribution - */ - @javax.annotation.Nullable - public Double getGrossDistribution() { - return grossDistribution; - } - - public void setGrossDistribution(Double grossDistribution) { - this.grossDistribution = grossDistribution; - } - - - public Form1099RRequest taxableAmount(Double taxableAmount) { - this.taxableAmount = taxableAmount; - return this; - } - - /** - * Taxable amount - * @return taxableAmount - */ - @javax.annotation.Nullable - public Double getTaxableAmount() { - return taxableAmount; - } - - public void setTaxableAmount(Double taxableAmount) { - this.taxableAmount = taxableAmount; - } - - - public Form1099RRequest taxableAmountNotDetermined(Boolean taxableAmountNotDetermined) { - this.taxableAmountNotDetermined = taxableAmountNotDetermined; - return this; - } - - /** - * Taxable amount not determined - * @return taxableAmountNotDetermined - */ - @javax.annotation.Nullable - public Boolean getTaxableAmountNotDetermined() { - return taxableAmountNotDetermined; - } - - public void setTaxableAmountNotDetermined(Boolean taxableAmountNotDetermined) { - this.taxableAmountNotDetermined = taxableAmountNotDetermined; - } - - - public Form1099RRequest totalDistributionDetermined(Boolean totalDistributionDetermined) { - this.totalDistributionDetermined = totalDistributionDetermined; - return this; - } - - /** - * Total distribution - * @return totalDistributionDetermined - */ - @javax.annotation.Nullable - public Boolean getTotalDistributionDetermined() { - return totalDistributionDetermined; - } - - public void setTotalDistributionDetermined(Boolean totalDistributionDetermined) { - this.totalDistributionDetermined = totalDistributionDetermined; - } - - - public Form1099RRequest capitalGain(Double capitalGain) { - this.capitalGain = capitalGain; - return this; - } - - /** - * Capital gain (included in Box 2a) - * @return capitalGain - */ - @javax.annotation.Nullable - public Double getCapitalGain() { - return capitalGain; - } - - public void setCapitalGain(Double capitalGain) { - this.capitalGain = capitalGain; - } - - - public Form1099RRequest federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099RRequest employeeContributionsOrDesignatedRothOrInsurancePremiums(Double employeeContributionsOrDesignatedRothOrInsurancePremiums) { - this.employeeContributionsOrDesignatedRothOrInsurancePremiums = employeeContributionsOrDesignatedRothOrInsurancePremiums; - return this; - } - - /** - * Employee contributions/Designated Roth contributions or insurance premiums - * @return employeeContributionsOrDesignatedRothOrInsurancePremiums - */ - @javax.annotation.Nullable - public Double getEmployeeContributionsOrDesignatedRothOrInsurancePremiums() { - return employeeContributionsOrDesignatedRothOrInsurancePremiums; - } - - public void setEmployeeContributionsOrDesignatedRothOrInsurancePremiums(Double employeeContributionsOrDesignatedRothOrInsurancePremiums) { - this.employeeContributionsOrDesignatedRothOrInsurancePremiums = employeeContributionsOrDesignatedRothOrInsurancePremiums; - } - - - public Form1099RRequest netUnrealizedAppreciationInEmployerSecurities(Double netUnrealizedAppreciationInEmployerSecurities) { - this.netUnrealizedAppreciationInEmployerSecurities = netUnrealizedAppreciationInEmployerSecurities; - return this; - } - - /** - * Net unrealized appreciation in employer's securities - * @return netUnrealizedAppreciationInEmployerSecurities - */ - @javax.annotation.Nullable - public Double getNetUnrealizedAppreciationInEmployerSecurities() { - return netUnrealizedAppreciationInEmployerSecurities; - } - - public void setNetUnrealizedAppreciationInEmployerSecurities(Double netUnrealizedAppreciationInEmployerSecurities) { - this.netUnrealizedAppreciationInEmployerSecurities = netUnrealizedAppreciationInEmployerSecurities; - } - - - public Form1099RRequest distributionCode(String distributionCode) { - this.distributionCode = distributionCode; - return this; - } - - /** - * Distribution code - * @return distributionCode - */ - @javax.annotation.Nullable - public String getDistributionCode() { - return distributionCode; - } - - public void setDistributionCode(String distributionCode) { - this.distributionCode = distributionCode; - } - - - public Form1099RRequest secondDistributionCode(String secondDistributionCode) { - this.secondDistributionCode = secondDistributionCode; - return this; - } - - /** - * Second distribution code - * @return secondDistributionCode - */ - @javax.annotation.Nullable - public String getSecondDistributionCode() { - return secondDistributionCode; - } - - public void setSecondDistributionCode(String secondDistributionCode) { - this.secondDistributionCode = secondDistributionCode; - } - - - public Form1099RRequest iraSepSimple(Boolean iraSepSimple) { - this.iraSepSimple = iraSepSimple; - return this; - } - - /** - * IRA/SEP/SIMPLE - * @return iraSepSimple - */ - @javax.annotation.Nullable - public Boolean getIraSepSimple() { - return iraSepSimple; - } - - public void setIraSepSimple(Boolean iraSepSimple) { - this.iraSepSimple = iraSepSimple; - } - - - public Form1099RRequest traditionalIraSepSimpleOrRothConversionAmount(Double traditionalIraSepSimpleOrRothConversionAmount) { - this.traditionalIraSepSimpleOrRothConversionAmount = traditionalIraSepSimpleOrRothConversionAmount; - return this; - } - - /** - * Traditional IRA/SEP/SIMPLE or Roth conversion amount - * @return traditionalIraSepSimpleOrRothConversionAmount - */ - @javax.annotation.Nullable - public Double getTraditionalIraSepSimpleOrRothConversionAmount() { - return traditionalIraSepSimpleOrRothConversionAmount; - } - - public void setTraditionalIraSepSimpleOrRothConversionAmount(Double traditionalIraSepSimpleOrRothConversionAmount) { - this.traditionalIraSepSimpleOrRothConversionAmount = traditionalIraSepSimpleOrRothConversionAmount; - } - - - public Form1099RRequest otherAmount(Double otherAmount) { - this.otherAmount = otherAmount; - return this; - } - - /** - * Other amount - * @return otherAmount - */ - @javax.annotation.Nullable - public Double getOtherAmount() { - return otherAmount; - } - - public void setOtherAmount(Double otherAmount) { - this.otherAmount = otherAmount; - } - - - public Form1099RRequest otherPercentage(String otherPercentage) { - this.otherPercentage = otherPercentage; - return this; - } - - /** - * Other percentage - * @return otherPercentage - */ - @javax.annotation.Nullable - public String getOtherPercentage() { - return otherPercentage; - } - - public void setOtherPercentage(String otherPercentage) { - this.otherPercentage = otherPercentage; - } - - - public Form1099RRequest totalDistributionPercentage(String totalDistributionPercentage) { - this.totalDistributionPercentage = totalDistributionPercentage; - return this; - } - - /** - * Total distribution percentage - * @return totalDistributionPercentage - */ - @javax.annotation.Nullable - public String getTotalDistributionPercentage() { - return totalDistributionPercentage; - } - - public void setTotalDistributionPercentage(String totalDistributionPercentage) { - this.totalDistributionPercentage = totalDistributionPercentage; - } - - - public Form1099RRequest totalEmployeeContributions(Double totalEmployeeContributions) { - this.totalEmployeeContributions = totalEmployeeContributions; - return this; - } - - /** - * Total employee contributions - * @return totalEmployeeContributions - */ - @javax.annotation.Nullable - public Double getTotalEmployeeContributions() { - return totalEmployeeContributions; - } - - public void setTotalEmployeeContributions(Double totalEmployeeContributions) { - this.totalEmployeeContributions = totalEmployeeContributions; - } - - - public Form1099RRequest amountAllocableToIrrWithin5Years(Double amountAllocableToIrrWithin5Years) { - this.amountAllocableToIrrWithin5Years = amountAllocableToIrrWithin5Years; - return this; - } - - /** - * Amount allocable to IRR within 5 years - * @return amountAllocableToIrrWithin5Years - */ - @javax.annotation.Nullable - public Double getAmountAllocableToIrrWithin5Years() { - return amountAllocableToIrrWithin5Years; - } - - public void setAmountAllocableToIrrWithin5Years(Double amountAllocableToIrrWithin5Years) { - this.amountAllocableToIrrWithin5Years = amountAllocableToIrrWithin5Years; - } - - - public Form1099RRequest firstYearOfDesignatedRothContribution(String firstYearOfDesignatedRothContribution) { - this.firstYearOfDesignatedRothContribution = firstYearOfDesignatedRothContribution; - return this; - } - - /** - * First year of designated Roth contribution - * @return firstYearOfDesignatedRothContribution - */ - @javax.annotation.Nullable - public String getFirstYearOfDesignatedRothContribution() { - return firstYearOfDesignatedRothContribution; - } - - public void setFirstYearOfDesignatedRothContribution(String firstYearOfDesignatedRothContribution) { - this.firstYearOfDesignatedRothContribution = firstYearOfDesignatedRothContribution; - } - - - public Form1099RRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099RRequest dateOfPayment(OffsetDateTime dateOfPayment) { - this.dateOfPayment = dateOfPayment; - return this; - } - - /** - * Date of payment - * @return dateOfPayment - */ - @javax.annotation.Nullable - public OffsetDateTime getDateOfPayment() { - return dateOfPayment; - } - - public void setDateOfPayment(OffsetDateTime dateOfPayment) { - this.dateOfPayment = dateOfPayment; - } - - - public Form1099RRequest type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - - public Form1099RRequest issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099RRequest referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099RRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099RRequest recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099RRequest tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099RRequest recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099RRequest address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099RRequest address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099RRequest city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099RRequest state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099RRequest zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099RRequest email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099RRequest accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099RRequest officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099RRequest nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099RRequest countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099RRequest federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099RRequest postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099RRequest stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099RRequest tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099RRequest noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099RRequest secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099RRequest addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099RRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099RRequest form1099RRequest = (Form1099RRequest) o; - return Objects.equals(this.grossDistribution, form1099RRequest.grossDistribution) && - Objects.equals(this.taxableAmount, form1099RRequest.taxableAmount) && - Objects.equals(this.taxableAmountNotDetermined, form1099RRequest.taxableAmountNotDetermined) && - Objects.equals(this.totalDistributionDetermined, form1099RRequest.totalDistributionDetermined) && - Objects.equals(this.capitalGain, form1099RRequest.capitalGain) && - Objects.equals(this.federalIncomeTaxWithheld, form1099RRequest.federalIncomeTaxWithheld) && - Objects.equals(this.employeeContributionsOrDesignatedRothOrInsurancePremiums, form1099RRequest.employeeContributionsOrDesignatedRothOrInsurancePremiums) && - Objects.equals(this.netUnrealizedAppreciationInEmployerSecurities, form1099RRequest.netUnrealizedAppreciationInEmployerSecurities) && - Objects.equals(this.distributionCode, form1099RRequest.distributionCode) && - Objects.equals(this.secondDistributionCode, form1099RRequest.secondDistributionCode) && - Objects.equals(this.iraSepSimple, form1099RRequest.iraSepSimple) && - Objects.equals(this.traditionalIraSepSimpleOrRothConversionAmount, form1099RRequest.traditionalIraSepSimpleOrRothConversionAmount) && - Objects.equals(this.otherAmount, form1099RRequest.otherAmount) && - Objects.equals(this.otherPercentage, form1099RRequest.otherPercentage) && - Objects.equals(this.totalDistributionPercentage, form1099RRequest.totalDistributionPercentage) && - Objects.equals(this.totalEmployeeContributions, form1099RRequest.totalEmployeeContributions) && - Objects.equals(this.amountAllocableToIrrWithin5Years, form1099RRequest.amountAllocableToIrrWithin5Years) && - Objects.equals(this.firstYearOfDesignatedRothContribution, form1099RRequest.firstYearOfDesignatedRothContribution) && - Objects.equals(this.fatcaFilingRequirement, form1099RRequest.fatcaFilingRequirement) && - Objects.equals(this.dateOfPayment, form1099RRequest.dateOfPayment) && - Objects.equals(this.type, form1099RRequest.type) && - Objects.equals(this.issuerId, form1099RRequest.issuerId) && - Objects.equals(this.referenceId, form1099RRequest.referenceId) && - Objects.equals(this.recipientTin, form1099RRequest.recipientTin) && - Objects.equals(this.recipientName, form1099RRequest.recipientName) && - Objects.equals(this.tinType, form1099RRequest.tinType) && - Objects.equals(this.recipientSecondName, form1099RRequest.recipientSecondName) && - Objects.equals(this.address, form1099RRequest.address) && - Objects.equals(this.address2, form1099RRequest.address2) && - Objects.equals(this.city, form1099RRequest.city) && - Objects.equals(this.state, form1099RRequest.state) && - Objects.equals(this.zip, form1099RRequest.zip) && - Objects.equals(this.email, form1099RRequest.email) && - Objects.equals(this.accountNumber, form1099RRequest.accountNumber) && - Objects.equals(this.officeCode, form1099RRequest.officeCode) && - Objects.equals(this.nonUsProvince, form1099RRequest.nonUsProvince) && - Objects.equals(this.countryCode, form1099RRequest.countryCode) && - Objects.equals(this.federalEFile, form1099RRequest.federalEFile) && - Objects.equals(this.postalMail, form1099RRequest.postalMail) && - Objects.equals(this.stateEFile, form1099RRequest.stateEFile) && - Objects.equals(this.tinMatch, form1099RRequest.tinMatch) && - Objects.equals(this.noTin, form1099RRequest.noTin) && - Objects.equals(this.secondTinNotice, form1099RRequest.secondTinNotice) && - Objects.equals(this.addressVerification, form1099RRequest.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, form1099RRequest.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(grossDistribution, taxableAmount, taxableAmountNotDetermined, totalDistributionDetermined, capitalGain, federalIncomeTaxWithheld, employeeContributionsOrDesignatedRothOrInsurancePremiums, netUnrealizedAppreciationInEmployerSecurities, distributionCode, secondDistributionCode, iraSepSimple, traditionalIraSepSimpleOrRothConversionAmount, otherAmount, otherPercentage, totalDistributionPercentage, totalEmployeeContributions, amountAllocableToIrrWithin5Years, firstYearOfDesignatedRothContribution, fatcaFilingRequirement, dateOfPayment, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099RRequest {\n"); - sb.append(" grossDistribution: ").append(toIndentedString(grossDistribution)).append("\n"); - sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n"); - sb.append(" taxableAmountNotDetermined: ").append(toIndentedString(taxableAmountNotDetermined)).append("\n"); - sb.append(" totalDistributionDetermined: ").append(toIndentedString(totalDistributionDetermined)).append("\n"); - sb.append(" capitalGain: ").append(toIndentedString(capitalGain)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" employeeContributionsOrDesignatedRothOrInsurancePremiums: ").append(toIndentedString(employeeContributionsOrDesignatedRothOrInsurancePremiums)).append("\n"); - sb.append(" netUnrealizedAppreciationInEmployerSecurities: ").append(toIndentedString(netUnrealizedAppreciationInEmployerSecurities)).append("\n"); - sb.append(" distributionCode: ").append(toIndentedString(distributionCode)).append("\n"); - sb.append(" secondDistributionCode: ").append(toIndentedString(secondDistributionCode)).append("\n"); - sb.append(" iraSepSimple: ").append(toIndentedString(iraSepSimple)).append("\n"); - sb.append(" traditionalIraSepSimpleOrRothConversionAmount: ").append(toIndentedString(traditionalIraSepSimpleOrRothConversionAmount)).append("\n"); - sb.append(" otherAmount: ").append(toIndentedString(otherAmount)).append("\n"); - sb.append(" otherPercentage: ").append(toIndentedString(otherPercentage)).append("\n"); - sb.append(" totalDistributionPercentage: ").append(toIndentedString(totalDistributionPercentage)).append("\n"); - sb.append(" totalEmployeeContributions: ").append(toIndentedString(totalEmployeeContributions)).append("\n"); - sb.append(" amountAllocableToIrrWithin5Years: ").append(toIndentedString(amountAllocableToIrrWithin5Years)).append("\n"); - sb.append(" firstYearOfDesignatedRothContribution: ").append(toIndentedString(firstYearOfDesignatedRothContribution)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" dateOfPayment: ").append(toIndentedString(dateOfPayment)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099RRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099RRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099RRequest is not found in the empty JSON string", Form1099RRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099RRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099RRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("distributionCode") != null && !jsonObj.get("distributionCode").isJsonNull()) && !jsonObj.get("distributionCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `distributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCode").toString())); - } - if ((jsonObj.get("secondDistributionCode") != null && !jsonObj.get("secondDistributionCode").isJsonNull()) && !jsonObj.get("secondDistributionCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secondDistributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondDistributionCode").toString())); - } - if ((jsonObj.get("otherPercentage") != null && !jsonObj.get("otherPercentage").isJsonNull()) && !jsonObj.get("otherPercentage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `otherPercentage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("otherPercentage").toString())); - } - if ((jsonObj.get("totalDistributionPercentage") != null && !jsonObj.get("totalDistributionPercentage").isJsonNull()) && !jsonObj.get("totalDistributionPercentage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `totalDistributionPercentage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalDistributionPercentage").toString())); - } - if ((jsonObj.get("firstYearOfDesignatedRothContribution") != null && !jsonObj.get("firstYearOfDesignatedRothContribution").isJsonNull()) && !jsonObj.get("firstYearOfDesignatedRothContribution").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `firstYearOfDesignatedRothContribution` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstYearOfDesignatedRothContribution").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099RRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099RRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099RRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099RRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099RRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099RRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099RRequest - * @throws IOException if the JSON string is invalid with respect to Form1099RRequest - */ - public static Form1099RRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099RRequest.class); - } - - /** - * Convert an instance of Form1099RRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RResponse.java deleted file mode 100644 index 5043153..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RResponse.java +++ /dev/null @@ -1,1962 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099RResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099RResponse { - public static final String SERIALIZED_NAME_GROSS_DISTRIBUTION = "grossDistribution"; - @SerializedName(SERIALIZED_NAME_GROSS_DISTRIBUTION) - private Double grossDistribution; - - public static final String SERIALIZED_NAME_TAXABLE_AMOUNT = "taxableAmount"; - @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT) - private Double taxableAmount; - - public static final String SERIALIZED_NAME_TAXABLE_AMOUNT_NOT_DETERMINED = "taxableAmountNotDetermined"; - @SerializedName(SERIALIZED_NAME_TAXABLE_AMOUNT_NOT_DETERMINED) - private Boolean taxableAmountNotDetermined; - - public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_DETERMINED = "totalDistributionDetermined"; - @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_DETERMINED) - private Boolean totalDistributionDetermined; - - public static final String SERIALIZED_NAME_CAPITAL_GAIN = "capitalGain"; - @SerializedName(SERIALIZED_NAME_CAPITAL_GAIN) - private Double capitalGain; - - public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; - @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) - private Double federalIncomeTaxWithheld; - - public static final String SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS_OR_DESIGNATED_ROTH_OR_INSURANCE_PREMIUMS = "employeeContributionsOrDesignatedRothOrInsurancePremiums"; - @SerializedName(SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS_OR_DESIGNATED_ROTH_OR_INSURANCE_PREMIUMS) - private Double employeeContributionsOrDesignatedRothOrInsurancePremiums; - - public static final String SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION_IN_EMPLOYER_SECURITIES = "netUnrealizedAppreciationInEmployerSecurities"; - @SerializedName(SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION_IN_EMPLOYER_SECURITIES) - private Double netUnrealizedAppreciationInEmployerSecurities; - - public static final String SERIALIZED_NAME_DISTRIBUTION_CODE = "distributionCode"; - @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE) - private String distributionCode; - - public static final String SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE = "secondDistributionCode"; - @SerializedName(SERIALIZED_NAME_SECOND_DISTRIBUTION_CODE) - private String secondDistributionCode; - - public static final String SERIALIZED_NAME_IRA_SEP_SIMPLE = "iraSepSimple"; - @SerializedName(SERIALIZED_NAME_IRA_SEP_SIMPLE) - private Boolean iraSepSimple; - - public static final String SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT = "traditionalIraSepSimpleOrRothConversionAmount"; - @SerializedName(SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT) - private Double traditionalIraSepSimpleOrRothConversionAmount; - - public static final String SERIALIZED_NAME_OTHER_AMOUNT = "otherAmount"; - @SerializedName(SERIALIZED_NAME_OTHER_AMOUNT) - private Double otherAmount; - - public static final String SERIALIZED_NAME_OTHER_PERCENTAGE = "otherPercentage"; - @SerializedName(SERIALIZED_NAME_OTHER_PERCENTAGE) - private String otherPercentage; - - public static final String SERIALIZED_NAME_TOTAL_DISTRIBUTION_PERCENTAGE = "totalDistributionPercentage"; - @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_PERCENTAGE) - private String totalDistributionPercentage; - - public static final String SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS = "totalEmployeeContributions"; - @SerializedName(SERIALIZED_NAME_TOTAL_EMPLOYEE_CONTRIBUTIONS) - private Double totalEmployeeContributions; - - public static final String SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR_WITHIN5_YEARS = "amountAllocableToIrrWithin5Years"; - @SerializedName(SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR_WITHIN5_YEARS) - private Double amountAllocableToIrrWithin5Years; - - public static final String SERIALIZED_NAME_FIRST_YEAR_OF_DESIGNATED_ROTH_CONTRIBUTION = "firstYearOfDesignatedRothContribution"; - @SerializedName(SERIALIZED_NAME_FIRST_YEAR_OF_DESIGNATED_ROTH_CONTRIBUTION) - private String firstYearOfDesignatedRothContribution; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_DATE_OF_PAYMENT = "dateOfPayment"; - @SerializedName(SERIALIZED_NAME_DATE_OF_PAYMENT) - private OffsetDateTime dateOfPayment; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - /** - * Gets or Sets tinType - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public Form1099RResponse() { - } - - public Form1099RResponse( - TypeEnum type - ) { - this(); - this.type = type; - } - - public Form1099RResponse grossDistribution(Double grossDistribution) { - this.grossDistribution = grossDistribution; - return this; - } - - /** - * Gross distribution - * @return grossDistribution - */ - @javax.annotation.Nullable - public Double getGrossDistribution() { - return grossDistribution; - } - - public void setGrossDistribution(Double grossDistribution) { - this.grossDistribution = grossDistribution; - } - - - public Form1099RResponse taxableAmount(Double taxableAmount) { - this.taxableAmount = taxableAmount; - return this; - } - - /** - * Taxable amount - * @return taxableAmount - */ - @javax.annotation.Nullable - public Double getTaxableAmount() { - return taxableAmount; - } - - public void setTaxableAmount(Double taxableAmount) { - this.taxableAmount = taxableAmount; - } - - - public Form1099RResponse taxableAmountNotDetermined(Boolean taxableAmountNotDetermined) { - this.taxableAmountNotDetermined = taxableAmountNotDetermined; - return this; - } - - /** - * Taxable amount not determined - * @return taxableAmountNotDetermined - */ - @javax.annotation.Nullable - public Boolean getTaxableAmountNotDetermined() { - return taxableAmountNotDetermined; - } - - public void setTaxableAmountNotDetermined(Boolean taxableAmountNotDetermined) { - this.taxableAmountNotDetermined = taxableAmountNotDetermined; - } - - - public Form1099RResponse totalDistributionDetermined(Boolean totalDistributionDetermined) { - this.totalDistributionDetermined = totalDistributionDetermined; - return this; - } - - /** - * Total distribution - * @return totalDistributionDetermined - */ - @javax.annotation.Nullable - public Boolean getTotalDistributionDetermined() { - return totalDistributionDetermined; - } - - public void setTotalDistributionDetermined(Boolean totalDistributionDetermined) { - this.totalDistributionDetermined = totalDistributionDetermined; - } - - - public Form1099RResponse capitalGain(Double capitalGain) { - this.capitalGain = capitalGain; - return this; - } - - /** - * Capital gain (included in Box 2a) - * @return capitalGain - */ - @javax.annotation.Nullable - public Double getCapitalGain() { - return capitalGain; - } - - public void setCapitalGain(Double capitalGain) { - this.capitalGain = capitalGain; - } - - - public Form1099RResponse federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - return this; - } - - /** - * Federal income tax withheld - * @return federalIncomeTaxWithheld - */ - @javax.annotation.Nullable - public Double getFederalIncomeTaxWithheld() { - return federalIncomeTaxWithheld; - } - - public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { - this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; - } - - - public Form1099RResponse employeeContributionsOrDesignatedRothOrInsurancePremiums(Double employeeContributionsOrDesignatedRothOrInsurancePremiums) { - this.employeeContributionsOrDesignatedRothOrInsurancePremiums = employeeContributionsOrDesignatedRothOrInsurancePremiums; - return this; - } - - /** - * Employee contributions/Designated Roth contributions or insurance premiums - * @return employeeContributionsOrDesignatedRothOrInsurancePremiums - */ - @javax.annotation.Nullable - public Double getEmployeeContributionsOrDesignatedRothOrInsurancePremiums() { - return employeeContributionsOrDesignatedRothOrInsurancePremiums; - } - - public void setEmployeeContributionsOrDesignatedRothOrInsurancePremiums(Double employeeContributionsOrDesignatedRothOrInsurancePremiums) { - this.employeeContributionsOrDesignatedRothOrInsurancePremiums = employeeContributionsOrDesignatedRothOrInsurancePremiums; - } - - - public Form1099RResponse netUnrealizedAppreciationInEmployerSecurities(Double netUnrealizedAppreciationInEmployerSecurities) { - this.netUnrealizedAppreciationInEmployerSecurities = netUnrealizedAppreciationInEmployerSecurities; - return this; - } - - /** - * Net unrealized appreciation in employer's securities - * @return netUnrealizedAppreciationInEmployerSecurities - */ - @javax.annotation.Nullable - public Double getNetUnrealizedAppreciationInEmployerSecurities() { - return netUnrealizedAppreciationInEmployerSecurities; - } - - public void setNetUnrealizedAppreciationInEmployerSecurities(Double netUnrealizedAppreciationInEmployerSecurities) { - this.netUnrealizedAppreciationInEmployerSecurities = netUnrealizedAppreciationInEmployerSecurities; - } - - - public Form1099RResponse distributionCode(String distributionCode) { - this.distributionCode = distributionCode; - return this; - } - - /** - * Distribution code - * @return distributionCode - */ - @javax.annotation.Nullable - public String getDistributionCode() { - return distributionCode; - } - - public void setDistributionCode(String distributionCode) { - this.distributionCode = distributionCode; - } - - - public Form1099RResponse secondDistributionCode(String secondDistributionCode) { - this.secondDistributionCode = secondDistributionCode; - return this; - } - - /** - * Second distribution code - * @return secondDistributionCode - */ - @javax.annotation.Nullable - public String getSecondDistributionCode() { - return secondDistributionCode; - } - - public void setSecondDistributionCode(String secondDistributionCode) { - this.secondDistributionCode = secondDistributionCode; - } - - - public Form1099RResponse iraSepSimple(Boolean iraSepSimple) { - this.iraSepSimple = iraSepSimple; - return this; - } - - /** - * IRA/SEP/SIMPLE - * @return iraSepSimple - */ - @javax.annotation.Nullable - public Boolean getIraSepSimple() { - return iraSepSimple; - } - - public void setIraSepSimple(Boolean iraSepSimple) { - this.iraSepSimple = iraSepSimple; - } - - - public Form1099RResponse traditionalIraSepSimpleOrRothConversionAmount(Double traditionalIraSepSimpleOrRothConversionAmount) { - this.traditionalIraSepSimpleOrRothConversionAmount = traditionalIraSepSimpleOrRothConversionAmount; - return this; - } - - /** - * Traditional IRA/SEP/SIMPLE or Roth conversion amount - * @return traditionalIraSepSimpleOrRothConversionAmount - */ - @javax.annotation.Nullable - public Double getTraditionalIraSepSimpleOrRothConversionAmount() { - return traditionalIraSepSimpleOrRothConversionAmount; - } - - public void setTraditionalIraSepSimpleOrRothConversionAmount(Double traditionalIraSepSimpleOrRothConversionAmount) { - this.traditionalIraSepSimpleOrRothConversionAmount = traditionalIraSepSimpleOrRothConversionAmount; - } - - - public Form1099RResponse otherAmount(Double otherAmount) { - this.otherAmount = otherAmount; - return this; - } - - /** - * Other amount - * @return otherAmount - */ - @javax.annotation.Nullable - public Double getOtherAmount() { - return otherAmount; - } - - public void setOtherAmount(Double otherAmount) { - this.otherAmount = otherAmount; - } - - - public Form1099RResponse otherPercentage(String otherPercentage) { - this.otherPercentage = otherPercentage; - return this; - } - - /** - * Other percentage - * @return otherPercentage - */ - @javax.annotation.Nullable - public String getOtherPercentage() { - return otherPercentage; - } - - public void setOtherPercentage(String otherPercentage) { - this.otherPercentage = otherPercentage; - } - - - public Form1099RResponse totalDistributionPercentage(String totalDistributionPercentage) { - this.totalDistributionPercentage = totalDistributionPercentage; - return this; - } - - /** - * Total distribution percentage - * @return totalDistributionPercentage - */ - @javax.annotation.Nullable - public String getTotalDistributionPercentage() { - return totalDistributionPercentage; - } - - public void setTotalDistributionPercentage(String totalDistributionPercentage) { - this.totalDistributionPercentage = totalDistributionPercentage; - } - - - public Form1099RResponse totalEmployeeContributions(Double totalEmployeeContributions) { - this.totalEmployeeContributions = totalEmployeeContributions; - return this; - } - - /** - * Total employee contributions - * @return totalEmployeeContributions - */ - @javax.annotation.Nullable - public Double getTotalEmployeeContributions() { - return totalEmployeeContributions; - } - - public void setTotalEmployeeContributions(Double totalEmployeeContributions) { - this.totalEmployeeContributions = totalEmployeeContributions; - } - - - public Form1099RResponse amountAllocableToIrrWithin5Years(Double amountAllocableToIrrWithin5Years) { - this.amountAllocableToIrrWithin5Years = amountAllocableToIrrWithin5Years; - return this; - } - - /** - * Amount allocable to IRR within 5 years - * @return amountAllocableToIrrWithin5Years - */ - @javax.annotation.Nullable - public Double getAmountAllocableToIrrWithin5Years() { - return amountAllocableToIrrWithin5Years; - } - - public void setAmountAllocableToIrrWithin5Years(Double amountAllocableToIrrWithin5Years) { - this.amountAllocableToIrrWithin5Years = amountAllocableToIrrWithin5Years; - } - - - public Form1099RResponse firstYearOfDesignatedRothContribution(String firstYearOfDesignatedRothContribution) { - this.firstYearOfDesignatedRothContribution = firstYearOfDesignatedRothContribution; - return this; - } - - /** - * First year of designated Roth contribution - * @return firstYearOfDesignatedRothContribution - */ - @javax.annotation.Nullable - public String getFirstYearOfDesignatedRothContribution() { - return firstYearOfDesignatedRothContribution; - } - - public void setFirstYearOfDesignatedRothContribution(String firstYearOfDesignatedRothContribution) { - this.firstYearOfDesignatedRothContribution = firstYearOfDesignatedRothContribution; - } - - - public Form1099RResponse fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * FATCA filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public Form1099RResponse dateOfPayment(OffsetDateTime dateOfPayment) { - this.dateOfPayment = dateOfPayment; - return this; - } - - /** - * Date of payment - * @return dateOfPayment - */ - @javax.annotation.Nullable - public OffsetDateTime getDateOfPayment() { - return dateOfPayment; - } - - public void setDateOfPayment(OffsetDateTime dateOfPayment) { - this.dateOfPayment = dateOfPayment; - } - - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - - public Form1099RResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public Form1099RResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public Form1099RResponse stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - public Form1099RResponse tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Get tinType - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099RResponse id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public Form1099RResponse issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Get issuerId - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public Form1099RResponse issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Get issuerReferenceId - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public Form1099RResponse issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Get issuerTin - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public Form1099RResponse taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Get taxYear - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public Form1099RResponse referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public Form1099RResponse recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get recipientName - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public Form1099RResponse recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Get recipientTin - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public Form1099RResponse recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Get recipientSecondName - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public Form1099RResponse address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public Form1099RResponse address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Get address2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public Form1099RResponse city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public Form1099RResponse state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public Form1099RResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public Form1099RResponse email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public Form1099RResponse accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public Form1099RResponse officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Get officeCode - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public Form1099RResponse nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Get nonUsProvince - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public Form1099RResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public Form1099RResponse federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Get federalEFile - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public Form1099RResponse postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Get postalMail - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public Form1099RResponse stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Get stateEFile - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public Form1099RResponse tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Get tinMatch - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public Form1099RResponse noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Get noTin - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099RResponse secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Get secondTinNotice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public Form1099RResponse addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Get addressVerification - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public Form1099RResponse federalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - return this; - } - - /** - * Get federalEfileStatus - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - public void setFederalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - } - - - public Form1099RResponse eDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - return this; - } - - /** - * Get eDeliveryStatus - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - } - - - public Form1099RResponse stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public Form1099RResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); - return this; - } - - /** - * Get stateEfileStatus - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - } - - - public Form1099RResponse postalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - return this; - } - - /** - * Get postalMailStatus - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - public void setPostalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - } - - - public Form1099RResponse tinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - return this; - } - - /** - * Get tinMatchStatus - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - public void setTinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - } - - - public Form1099RResponse addressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - return this; - } - - /** - * Get addressVerificationStatus - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - } - - - public Form1099RResponse validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public Form1099RResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } - - /** - * Get validationErrors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099RResponse form1099RResponse = (Form1099RResponse) o; - return Objects.equals(this.grossDistribution, form1099RResponse.grossDistribution) && - Objects.equals(this.taxableAmount, form1099RResponse.taxableAmount) && - Objects.equals(this.taxableAmountNotDetermined, form1099RResponse.taxableAmountNotDetermined) && - Objects.equals(this.totalDistributionDetermined, form1099RResponse.totalDistributionDetermined) && - Objects.equals(this.capitalGain, form1099RResponse.capitalGain) && - Objects.equals(this.federalIncomeTaxWithheld, form1099RResponse.federalIncomeTaxWithheld) && - Objects.equals(this.employeeContributionsOrDesignatedRothOrInsurancePremiums, form1099RResponse.employeeContributionsOrDesignatedRothOrInsurancePremiums) && - Objects.equals(this.netUnrealizedAppreciationInEmployerSecurities, form1099RResponse.netUnrealizedAppreciationInEmployerSecurities) && - Objects.equals(this.distributionCode, form1099RResponse.distributionCode) && - Objects.equals(this.secondDistributionCode, form1099RResponse.secondDistributionCode) && - Objects.equals(this.iraSepSimple, form1099RResponse.iraSepSimple) && - Objects.equals(this.traditionalIraSepSimpleOrRothConversionAmount, form1099RResponse.traditionalIraSepSimpleOrRothConversionAmount) && - Objects.equals(this.otherAmount, form1099RResponse.otherAmount) && - Objects.equals(this.otherPercentage, form1099RResponse.otherPercentage) && - Objects.equals(this.totalDistributionPercentage, form1099RResponse.totalDistributionPercentage) && - Objects.equals(this.totalEmployeeContributions, form1099RResponse.totalEmployeeContributions) && - Objects.equals(this.amountAllocableToIrrWithin5Years, form1099RResponse.amountAllocableToIrrWithin5Years) && - Objects.equals(this.firstYearOfDesignatedRothContribution, form1099RResponse.firstYearOfDesignatedRothContribution) && - Objects.equals(this.fatcaFilingRequirement, form1099RResponse.fatcaFilingRequirement) && - Objects.equals(this.dateOfPayment, form1099RResponse.dateOfPayment) && - Objects.equals(this.type, form1099RResponse.type) && - Objects.equals(this.createdAt, form1099RResponse.createdAt) && - Objects.equals(this.updatedAt, form1099RResponse.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, form1099RResponse.stateAndLocalWithholding) && - Objects.equals(this.tinType, form1099RResponse.tinType) && - Objects.equals(this.id, form1099RResponse.id) && - Objects.equals(this.issuerId, form1099RResponse.issuerId) && - Objects.equals(this.issuerReferenceId, form1099RResponse.issuerReferenceId) && - Objects.equals(this.issuerTin, form1099RResponse.issuerTin) && - Objects.equals(this.taxYear, form1099RResponse.taxYear) && - Objects.equals(this.referenceId, form1099RResponse.referenceId) && - Objects.equals(this.recipientName, form1099RResponse.recipientName) && - Objects.equals(this.recipientTin, form1099RResponse.recipientTin) && - Objects.equals(this.recipientSecondName, form1099RResponse.recipientSecondName) && - Objects.equals(this.address, form1099RResponse.address) && - Objects.equals(this.address2, form1099RResponse.address2) && - Objects.equals(this.city, form1099RResponse.city) && - Objects.equals(this.state, form1099RResponse.state) && - Objects.equals(this.zip, form1099RResponse.zip) && - Objects.equals(this.email, form1099RResponse.email) && - Objects.equals(this.accountNumber, form1099RResponse.accountNumber) && - Objects.equals(this.officeCode, form1099RResponse.officeCode) && - Objects.equals(this.nonUsProvince, form1099RResponse.nonUsProvince) && - Objects.equals(this.countryCode, form1099RResponse.countryCode) && - Objects.equals(this.federalEFile, form1099RResponse.federalEFile) && - Objects.equals(this.postalMail, form1099RResponse.postalMail) && - Objects.equals(this.stateEFile, form1099RResponse.stateEFile) && - Objects.equals(this.tinMatch, form1099RResponse.tinMatch) && - Objects.equals(this.noTin, form1099RResponse.noTin) && - Objects.equals(this.secondTinNotice, form1099RResponse.secondTinNotice) && - Objects.equals(this.addressVerification, form1099RResponse.addressVerification) && - Objects.equals(this.federalEfileStatus, form1099RResponse.federalEfileStatus) && - Objects.equals(this.eDeliveryStatus, form1099RResponse.eDeliveryStatus) && - Objects.equals(this.stateEfileStatus, form1099RResponse.stateEfileStatus) && - Objects.equals(this.postalMailStatus, form1099RResponse.postalMailStatus) && - Objects.equals(this.tinMatchStatus, form1099RResponse.tinMatchStatus) && - Objects.equals(this.addressVerificationStatus, form1099RResponse.addressVerificationStatus) && - Objects.equals(this.validationErrors, form1099RResponse.validationErrors); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(grossDistribution, taxableAmount, taxableAmountNotDetermined, totalDistributionDetermined, capitalGain, federalIncomeTaxWithheld, employeeContributionsOrDesignatedRothOrInsurancePremiums, netUnrealizedAppreciationInEmployerSecurities, distributionCode, secondDistributionCode, iraSepSimple, traditionalIraSepSimpleOrRothConversionAmount, otherAmount, otherPercentage, totalDistributionPercentage, totalEmployeeContributions, amountAllocableToIrrWithin5Years, firstYearOfDesignatedRothContribution, fatcaFilingRequirement, dateOfPayment, type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099RResponse {\n"); - sb.append(" grossDistribution: ").append(toIndentedString(grossDistribution)).append("\n"); - sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n"); - sb.append(" taxableAmountNotDetermined: ").append(toIndentedString(taxableAmountNotDetermined)).append("\n"); - sb.append(" totalDistributionDetermined: ").append(toIndentedString(totalDistributionDetermined)).append("\n"); - sb.append(" capitalGain: ").append(toIndentedString(capitalGain)).append("\n"); - sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); - sb.append(" employeeContributionsOrDesignatedRothOrInsurancePremiums: ").append(toIndentedString(employeeContributionsOrDesignatedRothOrInsurancePremiums)).append("\n"); - sb.append(" netUnrealizedAppreciationInEmployerSecurities: ").append(toIndentedString(netUnrealizedAppreciationInEmployerSecurities)).append("\n"); - sb.append(" distributionCode: ").append(toIndentedString(distributionCode)).append("\n"); - sb.append(" secondDistributionCode: ").append(toIndentedString(secondDistributionCode)).append("\n"); - sb.append(" iraSepSimple: ").append(toIndentedString(iraSepSimple)).append("\n"); - sb.append(" traditionalIraSepSimpleOrRothConversionAmount: ").append(toIndentedString(traditionalIraSepSimpleOrRothConversionAmount)).append("\n"); - sb.append(" otherAmount: ").append(toIndentedString(otherAmount)).append("\n"); - sb.append(" otherPercentage: ").append(toIndentedString(otherPercentage)).append("\n"); - sb.append(" totalDistributionPercentage: ").append(toIndentedString(totalDistributionPercentage)).append("\n"); - sb.append(" totalEmployeeContributions: ").append(toIndentedString(totalEmployeeContributions)).append("\n"); - sb.append(" amountAllocableToIrrWithin5Years: ").append(toIndentedString(amountAllocableToIrrWithin5Years)).append("\n"); - sb.append(" firstYearOfDesignatedRothContribution: ").append(toIndentedString(firstYearOfDesignatedRothContribution)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" dateOfPayment: ").append(toIndentedString(dateOfPayment)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("tinType"); - openapiFields.add("id"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("referenceId"); - openapiFields.add("recipientName"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("addressVerification"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("validationErrors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099RResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099RResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099RResponse is not found in the empty JSON string", Form1099RResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099RResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099RResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("distributionCode") != null && !jsonObj.get("distributionCode").isJsonNull()) && !jsonObj.get("distributionCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `distributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCode").toString())); - } - if ((jsonObj.get("secondDistributionCode") != null && !jsonObj.get("secondDistributionCode").isJsonNull()) && !jsonObj.get("secondDistributionCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secondDistributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondDistributionCode").toString())); - } - if ((jsonObj.get("otherPercentage") != null && !jsonObj.get("otherPercentage").isJsonNull()) && !jsonObj.get("otherPercentage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `otherPercentage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("otherPercentage").toString())); - } - if ((jsonObj.get("totalDistributionPercentage") != null && !jsonObj.get("totalDistributionPercentage").isJsonNull()) && !jsonObj.get("totalDistributionPercentage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `totalDistributionPercentage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("totalDistributionPercentage").toString())); - } - if ((jsonObj.get("firstYearOfDesignatedRothContribution") != null && !jsonObj.get("firstYearOfDesignatedRothContribution").isJsonNull()) && !jsonObj.get("firstYearOfDesignatedRothContribution").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `firstYearOfDesignatedRothContribution` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstYearOfDesignatedRothContribution").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099RResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099RResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099RResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099RResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099RResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099RResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099RResponse - * @throws IOException if the JSON string is invalid with respect to Form1099RResponse - */ - public static Form1099RResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099RResponse.class); - } - - /** - * Convert an instance of Form1099RResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetailResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetailResponse.java deleted file mode 100644 index e8403d5..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetailResponse.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Form1099StatusDetailResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Form1099StatusDetailResponse { - public static final String SERIALIZED_NAME_TIME = "time"; - @SerializedName(SERIALIZED_NAME_TIME) - private String time; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public Form1099StatusDetailResponse() { - } - - public Form1099StatusDetailResponse time(String time) { - this.time = time; - return this; - } - - /** - * The date the form is scheduled for or the time the status last changed - * @return time - */ - @javax.annotation.Nullable - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - - public Form1099StatusDetailResponse status(String status) { - this.status = status; - return this; - } - - /** - * The status of the form. Will be one of: * unsent * scheduled * sent * corrected_scheduled * accepted * corrected * corrected_accepted * held * pending * delivered * bad_verify * bad_verify_limit * bounced * verified * incomplete * failed * unchanged * unknown - * @return status - */ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Form1099StatusDetailResponse form1099StatusDetailResponse = (Form1099StatusDetailResponse) o; - return Objects.equals(this.time, form1099StatusDetailResponse.time) && - Objects.equals(this.status, form1099StatusDetailResponse.status); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(time, status); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Form1099StatusDetailResponse {\n"); - sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Form1099StatusDetailResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Form1099StatusDetailResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099StatusDetailResponse is not found in the empty JSON string", Form1099StatusDetailResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Form1099StatusDetailResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099StatusDetailResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("time") != null && !jsonObj.get("time").isJsonNull()) && !jsonObj.get("time").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time").toString())); - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Form1099StatusDetailResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Form1099StatusDetailResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Form1099StatusDetailResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Form1099StatusDetailResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Form1099StatusDetailResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Form1099StatusDetailResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of Form1099StatusDetailResponse - * @throws IOException if the JSON string is invalid with respect to Form1099StatusDetailResponse - */ - public static Form1099StatusDetailResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Form1099StatusDetailResponse.class); - } - - /** - * Convert an instance of Form1099StatusDetailResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestBase.java deleted file mode 100644 index 4d436dd..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestBase.java +++ /dev/null @@ -1,958 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * FormRequestBase - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class FormRequestBase { - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public FormRequestBase() { - } - - public FormRequestBase issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public FormRequestBase referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public FormRequestBase recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public FormRequestBase recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public FormRequestBase tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public FormRequestBase recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public FormRequestBase address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public FormRequestBase address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public FormRequestBase city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public FormRequestBase state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public FormRequestBase zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public FormRequestBase email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public FormRequestBase accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public FormRequestBase officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public FormRequestBase nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public FormRequestBase countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public FormRequestBase federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public FormRequestBase postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public FormRequestBase stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public FormRequestBase tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public FormRequestBase noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public FormRequestBase secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public FormRequestBase fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public FormRequestBase addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public FormRequestBase stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormRequestBase formRequestBase = (FormRequestBase) o; - return Objects.equals(this.issuerId, formRequestBase.issuerId) && - Objects.equals(this.referenceId, formRequestBase.referenceId) && - Objects.equals(this.recipientTin, formRequestBase.recipientTin) && - Objects.equals(this.recipientName, formRequestBase.recipientName) && - Objects.equals(this.tinType, formRequestBase.tinType) && - Objects.equals(this.recipientSecondName, formRequestBase.recipientSecondName) && - Objects.equals(this.address, formRequestBase.address) && - Objects.equals(this.address2, formRequestBase.address2) && - Objects.equals(this.city, formRequestBase.city) && - Objects.equals(this.state, formRequestBase.state) && - Objects.equals(this.zip, formRequestBase.zip) && - Objects.equals(this.email, formRequestBase.email) && - Objects.equals(this.accountNumber, formRequestBase.accountNumber) && - Objects.equals(this.officeCode, formRequestBase.officeCode) && - Objects.equals(this.nonUsProvince, formRequestBase.nonUsProvince) && - Objects.equals(this.countryCode, formRequestBase.countryCode) && - Objects.equals(this.federalEFile, formRequestBase.federalEFile) && - Objects.equals(this.postalMail, formRequestBase.postalMail) && - Objects.equals(this.stateEFile, formRequestBase.stateEFile) && - Objects.equals(this.tinMatch, formRequestBase.tinMatch) && - Objects.equals(this.noTin, formRequestBase.noTin) && - Objects.equals(this.secondTinNotice, formRequestBase.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, formRequestBase.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, formRequestBase.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, formRequestBase.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormRequestBase {\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FormRequestBase - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FormRequestBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FormRequestBase is not found in the empty JSON string", FormRequestBase.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FormRequestBase.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FormRequestBase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FormRequestBase.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FormRequestBase' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FormRequestBase.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FormRequestBase value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FormRequestBase read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FormRequestBase given an JSON string - * - * @param jsonString JSON string - * @return An instance of FormRequestBase - * @throws IOException if the JSON string is invalid with respect to FormRequestBase - */ - public static FormRequestBase fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FormRequestBase.class); - } - - /** - * Convert an instance of FormRequestBase to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestCsvBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestCsvBase.java deleted file mode 100644 index 5cfaf75..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestCsvBase.java +++ /dev/null @@ -1,961 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * FormRequestCsvBase - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class FormRequestCsvBase { - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - /** - * Gets or Sets tinType - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_RECIPIENT_EMAIL = "recipientEmail"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_EMAIL) - private String recipientEmail; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_RECIPIENT_NON_US_PROVINCE = "recipientNonUsProvince"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NON_US_PROVINCE) - private String recipientNonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public FormRequestCsvBase() { - } - - public FormRequestCsvBase issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Get issuerReferenceId - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public FormRequestCsvBase issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Get issuerTin - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public FormRequestCsvBase taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Get taxYear - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public FormRequestCsvBase issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Get issuerId - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public FormRequestCsvBase referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public FormRequestCsvBase recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get recipientName - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public FormRequestCsvBase recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Get recipientTin - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public FormRequestCsvBase tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Get tinType - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public FormRequestCsvBase recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Get recipientSecondName - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public FormRequestCsvBase address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public FormRequestCsvBase address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Get address2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public FormRequestCsvBase city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public FormRequestCsvBase state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public FormRequestCsvBase zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public FormRequestCsvBase recipientEmail(String recipientEmail) { - this.recipientEmail = recipientEmail; - return this; - } - - /** - * Get recipientEmail - * @return recipientEmail - */ - @javax.annotation.Nullable - public String getRecipientEmail() { - return recipientEmail; - } - - public void setRecipientEmail(String recipientEmail) { - this.recipientEmail = recipientEmail; - } - - - public FormRequestCsvBase accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public FormRequestCsvBase officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Get officeCode - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public FormRequestCsvBase recipientNonUsProvince(String recipientNonUsProvince) { - this.recipientNonUsProvince = recipientNonUsProvince; - return this; - } - - /** - * Get recipientNonUsProvince - * @return recipientNonUsProvince - */ - @javax.annotation.Nullable - public String getRecipientNonUsProvince() { - return recipientNonUsProvince; - } - - public void setRecipientNonUsProvince(String recipientNonUsProvince) { - this.recipientNonUsProvince = recipientNonUsProvince; - } - - - public FormRequestCsvBase countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public FormRequestCsvBase federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Get federalEFile - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public FormRequestCsvBase postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Get postalMail - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public FormRequestCsvBase stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Get stateEFile - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public FormRequestCsvBase tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Get tinMatch - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public FormRequestCsvBase addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Get addressVerification - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public FormRequestCsvBase stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormRequestCsvBase formRequestCsvBase = (FormRequestCsvBase) o; - return Objects.equals(this.issuerReferenceId, formRequestCsvBase.issuerReferenceId) && - Objects.equals(this.issuerTin, formRequestCsvBase.issuerTin) && - Objects.equals(this.taxYear, formRequestCsvBase.taxYear) && - Objects.equals(this.issuerId, formRequestCsvBase.issuerId) && - Objects.equals(this.referenceId, formRequestCsvBase.referenceId) && - Objects.equals(this.recipientName, formRequestCsvBase.recipientName) && - Objects.equals(this.recipientTin, formRequestCsvBase.recipientTin) && - Objects.equals(this.tinType, formRequestCsvBase.tinType) && - Objects.equals(this.recipientSecondName, formRequestCsvBase.recipientSecondName) && - Objects.equals(this.address, formRequestCsvBase.address) && - Objects.equals(this.address2, formRequestCsvBase.address2) && - Objects.equals(this.city, formRequestCsvBase.city) && - Objects.equals(this.state, formRequestCsvBase.state) && - Objects.equals(this.zip, formRequestCsvBase.zip) && - Objects.equals(this.recipientEmail, formRequestCsvBase.recipientEmail) && - Objects.equals(this.accountNumber, formRequestCsvBase.accountNumber) && - Objects.equals(this.officeCode, formRequestCsvBase.officeCode) && - Objects.equals(this.recipientNonUsProvince, formRequestCsvBase.recipientNonUsProvince) && - Objects.equals(this.countryCode, formRequestCsvBase.countryCode) && - Objects.equals(this.federalEFile, formRequestCsvBase.federalEFile) && - Objects.equals(this.postalMail, formRequestCsvBase.postalMail) && - Objects.equals(this.stateEFile, formRequestCsvBase.stateEFile) && - Objects.equals(this.tinMatch, formRequestCsvBase.tinMatch) && - Objects.equals(this.addressVerification, formRequestCsvBase.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, formRequestCsvBase.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormRequestCsvBase {\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" recipientEmail: ").append(toIndentedString(recipientEmail)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" recipientNonUsProvince: ").append(toIndentedString(recipientNonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientName"); - openapiFields.add("recipientTin"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("recipientEmail"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("recipientNonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FormRequestCsvBase - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FormRequestCsvBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FormRequestCsvBase is not found in the empty JSON string", FormRequestCsvBase.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FormRequestCsvBase.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FormRequestCsvBase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("recipientEmail") != null && !jsonObj.get("recipientEmail").isJsonNull()) && !jsonObj.get("recipientEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientEmail").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FormRequestCsvBase.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FormRequestCsvBase' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FormRequestCsvBase.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FormRequestCsvBase value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FormRequestCsvBase read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FormRequestCsvBase given an JSON string - * - * @param jsonString JSON string - * @return An instance of FormRequestCsvBase - * @throws IOException if the JSON string is invalid with respect to FormRequestCsvBase - */ - public static FormRequestCsvBase fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FormRequestCsvBase.class); - } - - /** - * Convert an instance of FormRequestCsvBase to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestListItemBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestListItemBase.java deleted file mode 100644 index ea75dea..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestListItemBase.java +++ /dev/null @@ -1,1047 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * FormRequestListItemBase - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class FormRequestListItemBase { - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public FormRequestListItemBase() { - } - - public FormRequestListItemBase issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public FormRequestListItemBase issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public FormRequestListItemBase taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Tax year - * @return taxYear - */ - @javax.annotation.Nonnull - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public FormRequestListItemBase issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public FormRequestListItemBase referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public FormRequestListItemBase recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public FormRequestListItemBase recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public FormRequestListItemBase tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public FormRequestListItemBase recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public FormRequestListItemBase address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public FormRequestListItemBase address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public FormRequestListItemBase city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public FormRequestListItemBase state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public FormRequestListItemBase zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public FormRequestListItemBase email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public FormRequestListItemBase accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public FormRequestListItemBase officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public FormRequestListItemBase nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public FormRequestListItemBase countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public FormRequestListItemBase federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public FormRequestListItemBase postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public FormRequestListItemBase stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public FormRequestListItemBase tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public FormRequestListItemBase noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public FormRequestListItemBase secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public FormRequestListItemBase fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public FormRequestListItemBase addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public FormRequestListItemBase stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormRequestListItemBase formRequestListItemBase = (FormRequestListItemBase) o; - return Objects.equals(this.issuerReferenceId, formRequestListItemBase.issuerReferenceId) && - Objects.equals(this.issuerTin, formRequestListItemBase.issuerTin) && - Objects.equals(this.taxYear, formRequestListItemBase.taxYear) && - Objects.equals(this.issuerId, formRequestListItemBase.issuerId) && - Objects.equals(this.referenceId, formRequestListItemBase.referenceId) && - Objects.equals(this.recipientTin, formRequestListItemBase.recipientTin) && - Objects.equals(this.recipientName, formRequestListItemBase.recipientName) && - Objects.equals(this.tinType, formRequestListItemBase.tinType) && - Objects.equals(this.recipientSecondName, formRequestListItemBase.recipientSecondName) && - Objects.equals(this.address, formRequestListItemBase.address) && - Objects.equals(this.address2, formRequestListItemBase.address2) && - Objects.equals(this.city, formRequestListItemBase.city) && - Objects.equals(this.state, formRequestListItemBase.state) && - Objects.equals(this.zip, formRequestListItemBase.zip) && - Objects.equals(this.email, formRequestListItemBase.email) && - Objects.equals(this.accountNumber, formRequestListItemBase.accountNumber) && - Objects.equals(this.officeCode, formRequestListItemBase.officeCode) && - Objects.equals(this.nonUsProvince, formRequestListItemBase.nonUsProvince) && - Objects.equals(this.countryCode, formRequestListItemBase.countryCode) && - Objects.equals(this.federalEFile, formRequestListItemBase.federalEFile) && - Objects.equals(this.postalMail, formRequestListItemBase.postalMail) && - Objects.equals(this.stateEFile, formRequestListItemBase.stateEFile) && - Objects.equals(this.tinMatch, formRequestListItemBase.tinMatch) && - Objects.equals(this.noTin, formRequestListItemBase.noTin) && - Objects.equals(this.secondTinNotice, formRequestListItemBase.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, formRequestListItemBase.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, formRequestListItemBase.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, formRequestListItemBase.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormRequestListItemBase {\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("taxYear"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FormRequestListItemBase - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FormRequestListItemBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FormRequestListItemBase is not found in the empty JSON string", FormRequestListItemBase.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FormRequestListItemBase.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FormRequestListItemBase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : FormRequestListItemBase.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FormRequestListItemBase.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FormRequestListItemBase' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FormRequestListItemBase.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FormRequestListItemBase value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FormRequestListItemBase read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FormRequestListItemBase given an JSON string - * - * @param jsonString JSON string - * @return An instance of FormRequestListItemBase - * @throws IOException if the JSON string is invalid with respect to FormRequestListItemBase - */ - public static FormRequestListItemBase fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FormRequestListItemBase.class); - } - - /** - * Convert an instance of FormRequestListItemBase to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestModel.java deleted file mode 100644 index fc80194..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestModel.java +++ /dev/null @@ -1,647 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * FormRequestModel - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class FormRequestModel { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - FORM_REQUEST("FormRequest"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - /** - * \"W9\" is currently the only supported value - */ - @JsonAdapter(FormTypeEnum.Adapter.class) - public enum FormTypeEnum { - W9("W9"); - - private String value; - - FormTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static FormTypeEnum fromValue(String value) { - for (FormTypeEnum b : FormTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final FormTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public FormTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return FormTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - FormTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; - @SerializedName(SERIALIZED_NAME_FORM_TYPE) - private FormTypeEnum formType; - - public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; - @SerializedName(SERIALIZED_NAME_COMPANY_ID) - private Integer companyId; - - public static final String SERIALIZED_NAME_COMPANY_NAME = "companyName"; - @SerializedName(SERIALIZED_NAME_COMPANY_NAME) - private String companyName; - - public static final String SERIALIZED_NAME_COMPANY_EMAIL = "companyEmail"; - @SerializedName(SERIALIZED_NAME_COMPANY_EMAIL) - private String companyEmail; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_SIGNED_AT = "signedAt"; - @SerializedName(SERIALIZED_NAME_SIGNED_AT) - private OffsetDateTime signedAt; - - /** - * Result of IRS TIN match query for name and TIN in the last signed form, null if signed_at is null - */ - @JsonAdapter(TinMatchStatusEnum.Adapter.class) - public enum TinMatchStatusEnum { - NONE("None"), - - MATCHED("Matched"); - - private String value; - - TinMatchStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinMatchStatusEnum fromValue(String value) { - for (TinMatchStatusEnum b : TinMatchStatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinMatchStatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinMatchStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinMatchStatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinMatchStatusEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private TinMatchStatusEnum tinMatchStatus; - - public static final String SERIALIZED_NAME_EXPIRES_AT = "expiresAt"; - @SerializedName(SERIALIZED_NAME_EXPIRES_AT) - private OffsetDateTime expiresAt; - - public static final String SERIALIZED_NAME_SIGNED_PDF = "signedPdf"; - @SerializedName(SERIALIZED_NAME_SIGNED_PDF) - private String signedPdf; - - public FormRequestModel() { - } - - public FormRequestModel id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public FormRequestModel type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - - public FormRequestModel formType(FormTypeEnum formType) { - this.formType = formType; - return this; - } - - /** - * \"W9\" is currently the only supported value - * @return formType - */ - @javax.annotation.Nullable - public FormTypeEnum getFormType() { - return formType; - } - - public void setFormType(FormTypeEnum formType) { - this.formType = formType; - } - - - public FormRequestModel companyId(Integer companyId) { - this.companyId = companyId; - return this; - } - - /** - * Track1099's ID of your company, found in the W-9 UI - * @return companyId - */ - @javax.annotation.Nullable - public Integer getCompanyId() { - return companyId; - } - - public void setCompanyId(Integer companyId) { - this.companyId = companyId; - } - - - public FormRequestModel companyName(String companyName) { - this.companyName = companyName; - return this; - } - - /** - * Name of your company, set in the W-9 UI - * @return companyName - */ - @javax.annotation.Nullable - public String getCompanyName() { - return companyName; - } - - public void setCompanyName(String companyName) { - this.companyName = companyName; - } - - - public FormRequestModel companyEmail(String companyEmail) { - this.companyEmail = companyEmail; - return this; - } - - /** - * Contact email of your company, set in the W-9 UI - * @return companyEmail - */ - @javax.annotation.Nullable - public String getCompanyEmail() { - return companyEmail; - } - - public void setCompanyEmail(String companyEmail) { - this.companyEmail = companyEmail; - } - - - public FormRequestModel referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Your internal identifier for the vendor from whom you are requesting a form - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public FormRequestModel signedAt(OffsetDateTime signedAt) { - this.signedAt = signedAt; - return this; - } - - /** - * The timestamp this vendor (identified by your ReferenceId) last signed a complete W-9, null if you did not include a ReferenceId or the vendor has not yet signed a W-9 in Track1099 - * @return signedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getSignedAt() { - return signedAt; - } - - public void setSignedAt(OffsetDateTime signedAt) { - this.signedAt = signedAt; - } - - - public FormRequestModel tinMatchStatus(TinMatchStatusEnum tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - return this; - } - - /** - * Result of IRS TIN match query for name and TIN in the last signed form, null if signed_at is null - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public TinMatchStatusEnum getTinMatchStatus() { - return tinMatchStatus; - } - - public void setTinMatchStatus(TinMatchStatusEnum tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - } - - - public FormRequestModel expiresAt(OffsetDateTime expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * Timestamp when this FormRequest will expire, ttl (or 3600) seconds from creation - * @return expiresAt - */ - @javax.annotation.Nullable - public OffsetDateTime getExpiresAt() { - return expiresAt; - } - - public void setExpiresAt(OffsetDateTime expiresAt) { - this.expiresAt = expiresAt; - } - - - public FormRequestModel signedPdf(String signedPdf) { - this.signedPdf = signedPdf; - return this; - } - - /** - * URL of PDF representation of just-signed form, otherwise null. Integrations may use this value to offer a \"download for your records\" function after a vendor completes and signs a form. Link expires at the same time as this FormRequest. Treat the format of this URL as opaque and expect it to change in the future. - * @return signedPdf - */ - @javax.annotation.Nullable - public String getSignedPdf() { - return signedPdf; - } - - public void setSignedPdf(String signedPdf) { - this.signedPdf = signedPdf; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormRequestModel formRequestModel = (FormRequestModel) o; - return Objects.equals(this.id, formRequestModel.id) && - Objects.equals(this.type, formRequestModel.type) && - Objects.equals(this.formType, formRequestModel.formType) && - Objects.equals(this.companyId, formRequestModel.companyId) && - Objects.equals(this.companyName, formRequestModel.companyName) && - Objects.equals(this.companyEmail, formRequestModel.companyEmail) && - Objects.equals(this.referenceId, formRequestModel.referenceId) && - Objects.equals(this.signedAt, formRequestModel.signedAt) && - Objects.equals(this.tinMatchStatus, formRequestModel.tinMatchStatus) && - Objects.equals(this.expiresAt, formRequestModel.expiresAt) && - Objects.equals(this.signedPdf, formRequestModel.signedPdf); - } - - @Override - public int hashCode() { - return Objects.hash(id, type, formType, companyId, companyName, companyEmail, referenceId, signedAt, tinMatchStatus, expiresAt, signedPdf); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormRequestModel {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" formType: ").append(toIndentedString(formType)).append("\n"); - sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); - sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); - sb.append(" companyEmail: ").append(toIndentedString(companyEmail)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" signedAt: ").append(toIndentedString(signedAt)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append(" signedPdf: ").append(toIndentedString(signedPdf)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FormRequestModel - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FormRequestModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FormRequestModel is not found in the empty JSON string", FormRequestModel.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FormRequestModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FormRequestModel` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) && !jsonObj.get("formType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `formType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("formType").toString())); - } - // validate the optional field `formType` - if (jsonObj.get("formType") != null && !jsonObj.get("formType").isJsonNull()) { - FormTypeEnum.validateJsonElement(jsonObj.get("formType")); - } - if ((jsonObj.get("companyName") != null && !jsonObj.get("companyName").isJsonNull()) && !jsonObj.get("companyName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyName").toString())); - } - if ((jsonObj.get("companyEmail") != null && !jsonObj.get("companyEmail").isJsonNull()) && !jsonObj.get("companyEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `companyEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyEmail").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) && !jsonObj.get("tinMatchStatus").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinMatchStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinMatchStatus").toString())); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - TinMatchStatusEnum.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - if ((jsonObj.get("signedPdf") != null && !jsonObj.get("signedPdf").isJsonNull()) && !jsonObj.get("signedPdf").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signedPdf` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signedPdf").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FormRequestModel.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FormRequestModel' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FormRequestModel.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FormRequestModel value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FormRequestModel read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FormRequestModel given an JSON string - * - * @param jsonString JSON string - * @return An instance of FormRequestModel - * @throws IOException if the JSON string is invalid with respect to FormRequestModel - */ - public static FormRequestModel fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FormRequestModel.class); - } - - /** - * Convert an instance of FormRequestModel to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/FormResponseBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormResponseBase.java deleted file mode 100644 index be993fa..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormResponseBase.java +++ /dev/null @@ -1,1447 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * FormResponseBase - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class FormResponseBase { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingResponse stateAndLocalWithholding; - - /** - * Gets or Sets tinType - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; - @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) - private String issuerReferenceId; - - public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; - @SerializedName(SERIALIZED_NAME_ISSUER_TIN) - private String issuerTin; - - public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; - @SerializedName(SERIALIZED_NAME_TAX_YEAR) - private Integer taxYear; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; - @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private StatusDetail federalEfileStatus; - - public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) - private StatusDetail eDeliveryStatus; - - public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; - @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; - - public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) - private StatusDetail postalMailStatus; - - public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) - private StatusDetail tinMatchStatus; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) - private StatusDetail addressVerificationStatus; - - public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; - @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; - - public FormResponseBase() { - } - - public FormResponseBase( - TypeEnum type - ) { - this(); - this.type = type; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - - - public FormResponseBase createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get createdAt - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - - public FormResponseBase updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Get updatedAt - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - - public FormResponseBase stateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * Get stateAndLocalWithholding - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingResponse getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingResponse stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - public FormResponseBase tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Get tinType - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public FormResponseBase id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public FormResponseBase issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Get issuerId - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public FormResponseBase issuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - return this; - } - - /** - * Get issuerReferenceId - * @return issuerReferenceId - */ - @javax.annotation.Nullable - public String getIssuerReferenceId() { - return issuerReferenceId; - } - - public void setIssuerReferenceId(String issuerReferenceId) { - this.issuerReferenceId = issuerReferenceId; - } - - - public FormResponseBase issuerTin(String issuerTin) { - this.issuerTin = issuerTin; - return this; - } - - /** - * Get issuerTin - * @return issuerTin - */ - @javax.annotation.Nullable - public String getIssuerTin() { - return issuerTin; - } - - public void setIssuerTin(String issuerTin) { - this.issuerTin = issuerTin; - } - - - public FormResponseBase taxYear(Integer taxYear) { - this.taxYear = taxYear; - return this; - } - - /** - * Get taxYear - * @return taxYear - */ - @javax.annotation.Nullable - public Integer getTaxYear() { - return taxYear; - } - - public void setTaxYear(Integer taxYear) { - this.taxYear = taxYear; - } - - - public FormResponseBase referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Get referenceId - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public FormResponseBase recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get recipientName - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public FormResponseBase recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Get recipientTin - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public FormResponseBase recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Get recipientSecondName - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public FormResponseBase address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public FormResponseBase address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Get address2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public FormResponseBase city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public FormResponseBase state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public FormResponseBase zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public FormResponseBase email(String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public FormResponseBase accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public FormResponseBase officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Get officeCode - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public FormResponseBase nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Get nonUsProvince - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public FormResponseBase countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public FormResponseBase federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Get federalEFile - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public FormResponseBase postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Get postalMail - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public FormResponseBase stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Get stateEFile - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public FormResponseBase tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Get tinMatch - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public FormResponseBase noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Get noTin - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public FormResponseBase secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Get secondTinNotice - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public FormResponseBase addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Get addressVerification - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public FormResponseBase federalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - return this; - } - - /** - * Get federalEfileStatus - * @return federalEfileStatus - */ - @javax.annotation.Nullable - public StatusDetail getFederalEfileStatus() { - return federalEfileStatus; - } - - public void setFederalEfileStatus(StatusDetail federalEfileStatus) { - this.federalEfileStatus = federalEfileStatus; - } - - - public FormResponseBase eDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - return this; - } - - /** - * Get eDeliveryStatus - * @return eDeliveryStatus - */ - @javax.annotation.Nullable - public StatusDetail geteDeliveryStatus() { - return eDeliveryStatus; - } - - public void seteDeliveryStatus(StatusDetail eDeliveryStatus) { - this.eDeliveryStatus = eDeliveryStatus; - } - - - public FormResponseBase stateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - return this; - } - - public FormResponseBase addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { - if (this.stateEfileStatus == null) { - this.stateEfileStatus = new ArrayList<>(); - } - this.stateEfileStatus.add(stateEfileStatusItem); - return this; - } - - /** - * Get stateEfileStatus - * @return stateEfileStatus - */ - @javax.annotation.Nullable - public List getStateEfileStatus() { - return stateEfileStatus; - } - - public void setStateEfileStatus(List stateEfileStatus) { - this.stateEfileStatus = stateEfileStatus; - } - - - public FormResponseBase postalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - return this; - } - - /** - * Get postalMailStatus - * @return postalMailStatus - */ - @javax.annotation.Nullable - public StatusDetail getPostalMailStatus() { - return postalMailStatus; - } - - public void setPostalMailStatus(StatusDetail postalMailStatus) { - this.postalMailStatus = postalMailStatus; - } - - - public FormResponseBase tinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - return this; - } - - /** - * Get tinMatchStatus - * @return tinMatchStatus - */ - @javax.annotation.Nullable - public StatusDetail getTinMatchStatus() { - return tinMatchStatus; - } - - public void setTinMatchStatus(StatusDetail tinMatchStatus) { - this.tinMatchStatus = tinMatchStatus; - } - - - public FormResponseBase addressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - return this; - } - - /** - * Get addressVerificationStatus - * @return addressVerificationStatus - */ - @javax.annotation.Nullable - public StatusDetail getAddressVerificationStatus() { - return addressVerificationStatus; - } - - public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) { - this.addressVerificationStatus = addressVerificationStatus; - } - - - public FormResponseBase validationErrors(List validationErrors) { - this.validationErrors = validationErrors; - return this; - } - - public FormResponseBase addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { - if (this.validationErrors == null) { - this.validationErrors = new ArrayList<>(); - } - this.validationErrors.add(validationErrorsItem); - return this; - } - - /** - * Get validationErrors - * @return validationErrors - */ - @javax.annotation.Nullable - public List getValidationErrors() { - return validationErrors; - } - - public void setValidationErrors(List validationErrors) { - this.validationErrors = validationErrors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormResponseBase formResponseBase = (FormResponseBase) o; - return Objects.equals(this.type, formResponseBase.type) && - Objects.equals(this.createdAt, formResponseBase.createdAt) && - Objects.equals(this.updatedAt, formResponseBase.updatedAt) && - Objects.equals(this.stateAndLocalWithholding, formResponseBase.stateAndLocalWithholding) && - Objects.equals(this.tinType, formResponseBase.tinType) && - Objects.equals(this.id, formResponseBase.id) && - Objects.equals(this.issuerId, formResponseBase.issuerId) && - Objects.equals(this.issuerReferenceId, formResponseBase.issuerReferenceId) && - Objects.equals(this.issuerTin, formResponseBase.issuerTin) && - Objects.equals(this.taxYear, formResponseBase.taxYear) && - Objects.equals(this.referenceId, formResponseBase.referenceId) && - Objects.equals(this.recipientName, formResponseBase.recipientName) && - Objects.equals(this.recipientTin, formResponseBase.recipientTin) && - Objects.equals(this.recipientSecondName, formResponseBase.recipientSecondName) && - Objects.equals(this.address, formResponseBase.address) && - Objects.equals(this.address2, formResponseBase.address2) && - Objects.equals(this.city, formResponseBase.city) && - Objects.equals(this.state, formResponseBase.state) && - Objects.equals(this.zip, formResponseBase.zip) && - Objects.equals(this.email, formResponseBase.email) && - Objects.equals(this.accountNumber, formResponseBase.accountNumber) && - Objects.equals(this.officeCode, formResponseBase.officeCode) && - Objects.equals(this.nonUsProvince, formResponseBase.nonUsProvince) && - Objects.equals(this.countryCode, formResponseBase.countryCode) && - Objects.equals(this.federalEFile, formResponseBase.federalEFile) && - Objects.equals(this.postalMail, formResponseBase.postalMail) && - Objects.equals(this.stateEFile, formResponseBase.stateEFile) && - Objects.equals(this.tinMatch, formResponseBase.tinMatch) && - Objects.equals(this.noTin, formResponseBase.noTin) && - Objects.equals(this.secondTinNotice, formResponseBase.secondTinNotice) && - Objects.equals(this.addressVerification, formResponseBase.addressVerification) && - Objects.equals(this.federalEfileStatus, formResponseBase.federalEfileStatus) && - Objects.equals(this.eDeliveryStatus, formResponseBase.eDeliveryStatus) && - Objects.equals(this.stateEfileStatus, formResponseBase.stateEfileStatus) && - Objects.equals(this.postalMailStatus, formResponseBase.postalMailStatus) && - Objects.equals(this.tinMatchStatus, formResponseBase.tinMatchStatus) && - Objects.equals(this.addressVerificationStatus, formResponseBase.addressVerificationStatus) && - Objects.equals(this.validationErrors, formResponseBase.validationErrors); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(type, createdAt, updatedAt, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, addressVerification, federalEfileStatus, eDeliveryStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormResponseBase {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); - sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); - sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); - sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); - sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); - sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); - sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); - sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); - sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); - openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("tinType"); - openapiFields.add("id"); - openapiFields.add("issuerId"); - openapiFields.add("issuerReferenceId"); - openapiFields.add("issuerTin"); - openapiFields.add("taxYear"); - openapiFields.add("referenceId"); - openapiFields.add("recipientName"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("addressVerification"); - openapiFields.add("federalEfileStatus"); - openapiFields.add("eDeliveryStatus"); - openapiFields.add("stateEfileStatus"); - openapiFields.add("postalMailStatus"); - openapiFields.add("tinMatchStatus"); - openapiFields.add("addressVerificationStatus"); - openapiFields.add("validationErrors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FormResponseBase - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FormResponseBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FormResponseBase is not found in the empty JSON string", FormResponseBase.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FormResponseBase.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FormResponseBase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingResponse.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); - } - if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `federalEfileStatus` - if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); - } - // validate the optional field `eDeliveryStatus` - if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); - } - if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { - JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); - if (jsonArraystateEfileStatus != null) { - // ensure the json data is an array - if (!jsonObj.get("stateEfileStatus").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); - } - - // validate the optional field `stateEfileStatus` (array) - for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); - }; - } - } - // validate the optional field `postalMailStatus` - if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); - } - // validate the optional field `tinMatchStatus` - if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); - } - // validate the optional field `addressVerificationStatus` - if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { - StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); - } - if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { - JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); - if (jsonArrayvalidationErrors != null) { - // ensure the json data is an array - if (!jsonObj.get("validationErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); - } - - // validate the optional field `validationErrors` (array) - for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FormResponseBase.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FormResponseBase' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FormResponseBase.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FormResponseBase value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FormResponseBase read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FormResponseBase given an JSON string - * - * @param jsonString JSON string - * @return An instance of FormResponseBase - * @throws IOException if the JSON string is invalid with respect to FormResponseBase - */ - public static FormResponseBase fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FormResponseBase.class); - } - - /** - * Convert an instance of FormResponseBase to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/FormSingleRequestBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormSingleRequestBase.java deleted file mode 100644 index 9aaf7fc..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormSingleRequestBase.java +++ /dev/null @@ -1,1056 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * FormSingleRequestBase - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class FormSingleRequestBase { - /** - * Gets or Sets type - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - _1099_NEC("1099-NEC"), - - _1099_MISC("1099-MISC"), - - _1099_DIV("1099-DIV"), - - _1099_R("1099-R"), - - _1099_K("1099-K"), - - _1095_B("1095-B"), - - _1042_S("1042-S"), - - _1095_C("1095-C"), - - _1099_INT("1099-INT"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private TypeEnum type; - - public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; - @SerializedName(SERIALIZED_NAME_ISSUER_ID) - private String issuerId; - - public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; - @SerializedName(SERIALIZED_NAME_REFERENCE_ID) - private String referenceId; - - public static final String SERIALIZED_NAME_RECIPIENT_TIN = "recipientTin"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_TIN) - private String recipientTin; - - public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) - private String recipientName; - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - - public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; - @SerializedName(SERIALIZED_NAME_ADDRESS2) - private String address2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; - @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) - private String nonUsProvince; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FEDERAL_E_FILE = "federalEFile"; - @SerializedName(SERIALIZED_NAME_FEDERAL_E_FILE) - private Boolean federalEFile; - - public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; - @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) - private Boolean postalMail; - - public static final String SERIALIZED_NAME_STATE_E_FILE = "stateEFile"; - @SerializedName(SERIALIZED_NAME_STATE_E_FILE) - private Boolean stateEFile; - - public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; - @SerializedName(SERIALIZED_NAME_TIN_MATCH) - private Boolean tinMatch; - - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - - public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; - @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) - private Boolean fatcaFilingRequirement; - - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; - @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) - private Boolean addressVerification; - - public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; - @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) - private StateAndLocalWithholdingRequest stateAndLocalWithholding; - - public FormSingleRequestBase() { - } - - public FormSingleRequestBase type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(TypeEnum type) { - this.type = type; - } - - - public FormSingleRequestBase issuerId(String issuerId) { - this.issuerId = issuerId; - return this; - } - - /** - * Issuer ID - * @return issuerId - */ - @javax.annotation.Nullable - public String getIssuerId() { - return issuerId; - } - - public void setIssuerId(String issuerId) { - this.issuerId = issuerId; - } - - - public FormSingleRequestBase referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - /** - * Reference ID - * @return referenceId - */ - @javax.annotation.Nullable - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - - public FormSingleRequestBase recipientTin(String recipientTin) { - this.recipientTin = recipientTin; - return this; - } - - /** - * Recipient Tax ID Number - * @return recipientTin - */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; - } - - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; - } - - - public FormSingleRequestBase recipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Recipient name - * @return recipientName - */ - @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; - } - - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; - } - - - public FormSingleRequestBase tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public FormSingleRequestBase recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - - public FormSingleRequestBase address(String address) { - this.address = address; - return this; - } - - /** - * Address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public FormSingleRequestBase address2(String address2) { - this.address2 = address2; - return this; - } - - /** - * Address line 2 - * @return address2 - */ - @javax.annotation.Nullable - public String getAddress2() { - return address2; - } - - public void setAddress2(String address2) { - this.address2 = address2; - } - - - public FormSingleRequestBase city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public FormSingleRequestBase state(String state) { - this.state = state; - return this; - } - - /** - * US state. Required if CountryCode is \"US\". - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public FormSingleRequestBase zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Zip/postal code - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - public FormSingleRequestBase email(String email) { - this.email = email; - return this; - } - - /** - * Recipient email address - * @return email - */ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - - public FormSingleRequestBase accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Account number - * @return accountNumber - */ - @javax.annotation.Nullable - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - - public FormSingleRequestBase officeCode(String officeCode) { - this.officeCode = officeCode; - return this; - } - - /** - * Office code - * @return officeCode - */ - @javax.annotation.Nullable - public String getOfficeCode() { - return officeCode; - } - - public void setOfficeCode(String officeCode) { - this.officeCode = officeCode; - } - - - public FormSingleRequestBase nonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - return this; - } - - /** - * Foreign province - * @return nonUsProvince - */ - @javax.annotation.Nullable - public String getNonUsProvince() { - return nonUsProvince; - } - - public void setNonUsProvince(String nonUsProvince) { - this.nonUsProvince = nonUsProvince; - } - - - public FormSingleRequestBase countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public FormSingleRequestBase federalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - return this; - } - - /** - * Boolean indicating that federal e-filing should be scheduled for this form - * @return federalEFile - */ - @javax.annotation.Nullable - public Boolean getFederalEFile() { - return federalEFile; - } - - public void setFederalEFile(Boolean federalEFile) { - this.federalEFile = federalEFile; - } - - - public FormSingleRequestBase postalMail(Boolean postalMail) { - this.postalMail = postalMail; - return this; - } - - /** - * Boolean indicating that postal mailing to the recipient should be scheduled for this form - * @return postalMail - */ - @javax.annotation.Nullable - public Boolean getPostalMail() { - return postalMail; - } - - public void setPostalMail(Boolean postalMail) { - this.postalMail = postalMail; - } - - - public FormSingleRequestBase stateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - return this; - } - - /** - * Boolean indicating that state e-filing should be scheduled for this form - * @return stateEFile - */ - @javax.annotation.Nullable - public Boolean getStateEFile() { - return stateEFile; - } - - public void setStateEFile(Boolean stateEFile) { - this.stateEFile = stateEFile; - } - - - public FormSingleRequestBase tinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - return this; - } - - /** - * Boolean indicating that TIN Matching should be scheduled for this form - * @return tinMatch - */ - @javax.annotation.Nullable - public Boolean getTinMatch() { - return tinMatch; - } - - public void setTinMatch(Boolean tinMatch) { - this.tinMatch = tinMatch; - } - - - public FormSingleRequestBase noTin(Boolean noTin) { - this.noTin = noTin; - return this; - } - - /** - * Indicates whether the recipient has no TIN - * @return noTin - */ - @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; - } - - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public FormSingleRequestBase secondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - return this; - } - - /** - * Second TIN notice in three years - * @return secondTinNotice - */ - @javax.annotation.Nullable - public Boolean getSecondTinNotice() { - return secondTinNotice; - } - - public void setSecondTinNotice(Boolean secondTinNotice) { - this.secondTinNotice = secondTinNotice; - } - - - public FormSingleRequestBase fatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - return this; - } - - /** - * Fatca filing requirement - * @return fatcaFilingRequirement - */ - @javax.annotation.Nullable - public Boolean getFatcaFilingRequirement() { - return fatcaFilingRequirement; - } - - public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { - this.fatcaFilingRequirement = fatcaFilingRequirement; - } - - - public FormSingleRequestBase addressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - return this; - } - - /** - * Boolean indicating that address verification should be scheduled for this form - * @return addressVerification - */ - @javax.annotation.Nullable - public Boolean getAddressVerification() { - return addressVerification; - } - - public void setAddressVerification(Boolean addressVerification) { - this.addressVerification = addressVerification; - } - - - public FormSingleRequestBase stateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - return this; - } - - /** - * State and local withholding information - * @return stateAndLocalWithholding - */ - @javax.annotation.Nullable - public StateAndLocalWithholdingRequest getStateAndLocalWithholding() { - return stateAndLocalWithholding; - } - - public void setStateAndLocalWithholding(StateAndLocalWithholdingRequest stateAndLocalWithholding) { - this.stateAndLocalWithholding = stateAndLocalWithholding; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormSingleRequestBase formSingleRequestBase = (FormSingleRequestBase) o; - return Objects.equals(this.type, formSingleRequestBase.type) && - Objects.equals(this.issuerId, formSingleRequestBase.issuerId) && - Objects.equals(this.referenceId, formSingleRequestBase.referenceId) && - Objects.equals(this.recipientTin, formSingleRequestBase.recipientTin) && - Objects.equals(this.recipientName, formSingleRequestBase.recipientName) && - Objects.equals(this.tinType, formSingleRequestBase.tinType) && - Objects.equals(this.recipientSecondName, formSingleRequestBase.recipientSecondName) && - Objects.equals(this.address, formSingleRequestBase.address) && - Objects.equals(this.address2, formSingleRequestBase.address2) && - Objects.equals(this.city, formSingleRequestBase.city) && - Objects.equals(this.state, formSingleRequestBase.state) && - Objects.equals(this.zip, formSingleRequestBase.zip) && - Objects.equals(this.email, formSingleRequestBase.email) && - Objects.equals(this.accountNumber, formSingleRequestBase.accountNumber) && - Objects.equals(this.officeCode, formSingleRequestBase.officeCode) && - Objects.equals(this.nonUsProvince, formSingleRequestBase.nonUsProvince) && - Objects.equals(this.countryCode, formSingleRequestBase.countryCode) && - Objects.equals(this.federalEFile, formSingleRequestBase.federalEFile) && - Objects.equals(this.postalMail, formSingleRequestBase.postalMail) && - Objects.equals(this.stateEFile, formSingleRequestBase.stateEFile) && - Objects.equals(this.tinMatch, formSingleRequestBase.tinMatch) && - Objects.equals(this.noTin, formSingleRequestBase.noTin) && - Objects.equals(this.secondTinNotice, formSingleRequestBase.secondTinNotice) && - Objects.equals(this.fatcaFilingRequirement, formSingleRequestBase.fatcaFilingRequirement) && - Objects.equals(this.addressVerification, formSingleRequestBase.addressVerification) && - Objects.equals(this.stateAndLocalWithholding, formSingleRequestBase.stateAndLocalWithholding); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, noTin, secondTinNotice, fatcaFilingRequirement, addressVerification, stateAndLocalWithholding); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormSingleRequestBase {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); - sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); - sb.append(" recipientTin: ").append(toIndentedString(recipientTin)).append("\n"); - sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" federalEFile: ").append(toIndentedString(federalEFile)).append("\n"); - sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); - sb.append(" stateEFile: ").append(toIndentedString(stateEFile)).append("\n"); - sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); - sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); - sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); - sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); - sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("issuerId"); - openapiFields.add("referenceId"); - openapiFields.add("recipientTin"); - openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); - openapiFields.add("address"); - openapiFields.add("address2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); - openapiFields.add("nonUsProvince"); - openapiFields.add("countryCode"); - openapiFields.add("federalEFile"); - openapiFields.add("postalMail"); - openapiFields.add("stateEFile"); - openapiFields.add("tinMatch"); - openapiFields.add("noTin"); - openapiFields.add("secondTinNotice"); - openapiFields.add("fatcaFilingRequirement"); - openapiFields.add("addressVerification"); - openapiFields.add("stateAndLocalWithholding"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to FormSingleRequestBase - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!FormSingleRequestBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FormSingleRequestBase is not found in the empty JSON string", FormSingleRequestBase.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FormSingleRequestBase.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FormSingleRequestBase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); - } - if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); - } - if ((jsonObj.get("recipientTin") != null && !jsonObj.get("recipientTin").isJsonNull()) && !jsonObj.get("recipientTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientTin").toString())); - } - if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); - } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } - if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - // validate the optional field `stateAndLocalWithholding` - if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { - StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FormSingleRequestBase.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FormSingleRequestBase' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FormSingleRequestBase.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FormSingleRequestBase value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FormSingleRequestBase read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of FormSingleRequestBase given an JSON string - * - * @param jsonString JSON string - * @return An instance of FormSingleRequestBase - * @throws IOException if the JSON string is invalid with respect to FormSingleRequestBase - */ - public static FormSingleRequestBase fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, FormSingleRequestBase.class); - } - - /** - * Convert an instance of FormSingleRequestBase to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java index fd74235..abfbeaf 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java @@ -20,28 +20,30 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualReferenceResponse; -import Avalara.SDK.model.A1099.V2.Form1042SListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1095BListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099BaseResponse; -import Avalara.SDK.model.A1099.V2.Form1099DivListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099IntListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099KListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse; -import Avalara.SDK.model.A1099.V2.Form1099RListItemResponse; -import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughResponse; -import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentResponse; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; +import Avalara.SDK.model.A1099.V2.CoveredIndividual; +import Avalara.SDK.model.A1099.V2.Form1042S; +import Avalara.SDK.model.A1099.V2.Form1095B; +import Avalara.SDK.model.A1099.V2.Form1095C; +import Avalara.SDK.model.A1099.V2.Form1099Div; +import Avalara.SDK.model.A1099.V2.Form1099Int; +import Avalara.SDK.model.A1099.V2.Form1099K; +import Avalara.SDK.model.A1099.V2.Form1099Misc; +import Avalara.SDK.model.A1099.V2.Form1099Nec; +import Avalara.SDK.model.A1099.V2.Form1099R; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough; +import Avalara.SDK.model.A1099.V2.OfferAndCoverage; +import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -95,15 +97,15 @@ public TypeAdapter create(Gson gson, TypeToken type) { return null; // this class only serializes 'Get1099Form200Response' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterForm1099BaseResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099BaseResponse.class)); - final TypeAdapter adapterForm1042SListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItemResponse.class)); - final TypeAdapter adapterForm1095BListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItemResponse.class)); - final TypeAdapter adapterForm1099DivListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivListItemResponse.class)); - final TypeAdapter adapterForm1099IntListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntListItemResponse.class)); - final TypeAdapter adapterForm1099KListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099KListItemResponse.class)); - final TypeAdapter adapterForm1099MiscListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscListItemResponse.class)); - final TypeAdapter adapterForm1099NecListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecListItemResponse.class)); - final TypeAdapter adapterForm1099RListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099RListItemResponse.class)); + final TypeAdapter adapterForm1042S = gson.getDelegateAdapter(this, TypeToken.get(Form1042S.class)); + final TypeAdapter adapterForm1095B = gson.getDelegateAdapter(this, TypeToken.get(Form1095B.class)); + final TypeAdapter adapterForm1095C = gson.getDelegateAdapter(this, TypeToken.get(Form1095C.class)); + final TypeAdapter adapterForm1099Div = gson.getDelegateAdapter(this, TypeToken.get(Form1099Div.class)); + final TypeAdapter adapterForm1099Int = gson.getDelegateAdapter(this, TypeToken.get(Form1099Int.class)); + final TypeAdapter adapterForm1099K = gson.getDelegateAdapter(this, TypeToken.get(Form1099K.class)); + final TypeAdapter adapterForm1099Misc = gson.getDelegateAdapter(this, TypeToken.get(Form1099Misc.class)); + final TypeAdapter adapterForm1099Nec = gson.getDelegateAdapter(this, TypeToken.get(Form1099Nec.class)); + final TypeAdapter adapterForm1099R = gson.getDelegateAdapter(this, TypeToken.get(Form1099R.class)); return (TypeAdapter) new TypeAdapter() { @Override @@ -113,61 +115,61 @@ public void write(JsonWriter out, Get1099Form200Response value) throws IOExcepti return; } - // check if the actual instance is of the type `Form1099BaseResponse` - if (value.getActualInstance() instanceof Form1099BaseResponse) { - JsonElement element = adapterForm1099BaseResponse.toJsonTree((Form1099BaseResponse)value.getActualInstance()); + // check if the actual instance is of the type `Form1042S` + if (value.getActualInstance() instanceof Form1042S) { + JsonElement element = adapterForm1042S.toJsonTree((Form1042S)value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Form1042SListItemResponse` - if (value.getActualInstance() instanceof Form1042SListItemResponse) { - JsonElement element = adapterForm1042SListItemResponse.toJsonTree((Form1042SListItemResponse)value.getActualInstance()); + // check if the actual instance is of the type `Form1095B` + if (value.getActualInstance() instanceof Form1095B) { + JsonElement element = adapterForm1095B.toJsonTree((Form1095B)value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Form1095BListItemResponse` - if (value.getActualInstance() instanceof Form1095BListItemResponse) { - JsonElement element = adapterForm1095BListItemResponse.toJsonTree((Form1095BListItemResponse)value.getActualInstance()); + // check if the actual instance is of the type `Form1095C` + if (value.getActualInstance() instanceof Form1095C) { + JsonElement element = adapterForm1095C.toJsonTree((Form1095C)value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Form1099DivListItemResponse` - if (value.getActualInstance() instanceof Form1099DivListItemResponse) { - JsonElement element = adapterForm1099DivListItemResponse.toJsonTree((Form1099DivListItemResponse)value.getActualInstance()); + // check if the actual instance is of the type `Form1099Div` + if (value.getActualInstance() instanceof Form1099Div) { + JsonElement element = adapterForm1099Div.toJsonTree((Form1099Div)value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Form1099IntListItemResponse` - if (value.getActualInstance() instanceof Form1099IntListItemResponse) { - JsonElement element = adapterForm1099IntListItemResponse.toJsonTree((Form1099IntListItemResponse)value.getActualInstance()); + // check if the actual instance is of the type `Form1099Int` + if (value.getActualInstance() instanceof Form1099Int) { + JsonElement element = adapterForm1099Int.toJsonTree((Form1099Int)value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Form1099KListItemResponse` - if (value.getActualInstance() instanceof Form1099KListItemResponse) { - JsonElement element = adapterForm1099KListItemResponse.toJsonTree((Form1099KListItemResponse)value.getActualInstance()); + // check if the actual instance is of the type `Form1099K` + if (value.getActualInstance() instanceof Form1099K) { + JsonElement element = adapterForm1099K.toJsonTree((Form1099K)value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Form1099MiscListItemResponse` - if (value.getActualInstance() instanceof Form1099MiscListItemResponse) { - JsonElement element = adapterForm1099MiscListItemResponse.toJsonTree((Form1099MiscListItemResponse)value.getActualInstance()); + // check if the actual instance is of the type `Form1099Misc` + if (value.getActualInstance() instanceof Form1099Misc) { + JsonElement element = adapterForm1099Misc.toJsonTree((Form1099Misc)value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Form1099NecListItemResponse` - if (value.getActualInstance() instanceof Form1099NecListItemResponse) { - JsonElement element = adapterForm1099NecListItemResponse.toJsonTree((Form1099NecListItemResponse)value.getActualInstance()); + // check if the actual instance is of the type `Form1099Nec` + if (value.getActualInstance() instanceof Form1099Nec) { + JsonElement element = adapterForm1099Nec.toJsonTree((Form1099Nec)value.getActualInstance()); elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `Form1099RListItemResponse` - if (value.getActualInstance() instanceof Form1099RListItemResponse) { - JsonElement element = adapterForm1099RListItemResponse.toJsonTree((Form1099RListItemResponse)value.getActualInstance()); + // check if the actual instance is of the type `Form1099R` + if (value.getActualInstance() instanceof Form1099R) { + JsonElement element = adapterForm1099R.toJsonTree((Form1099R)value.getActualInstance()); elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R"); } @Override @@ -179,113 +181,113 @@ public Get1099Form200Response read(JsonReader in) throws IOException { ArrayList errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; - // deserialize Form1099BaseResponse + // deserialize Form1042S try { // validate the JSON object to see if any exception is thrown - Form1099BaseResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099BaseResponse; + Form1042S.validateJsonElement(jsonElement); + actualAdapter = adapterForm1042S; match++; - log.log(Level.FINER, "Input data matches schema 'Form1099BaseResponse'"); + log.log(Level.FINER, "Input data matches schema 'Form1042S'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099BaseResponse'", e); + errorMessages.add(String.format("Deserialization for Form1042S failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1042S'", e); } - // deserialize Form1042SListItemResponse + // deserialize Form1095B try { // validate the JSON object to see if any exception is thrown - Form1042SListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1042SListItemResponse; + Form1095B.validateJsonElement(jsonElement); + actualAdapter = adapterForm1095B; match++; - log.log(Level.FINER, "Input data matches schema 'Form1042SListItemResponse'"); + log.log(Level.FINER, "Input data matches schema 'Form1095B'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1042SListItemResponse'", e); + errorMessages.add(String.format("Deserialization for Form1095B failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1095B'", e); } - // deserialize Form1095BListItemResponse + // deserialize Form1095C try { // validate the JSON object to see if any exception is thrown - Form1095BListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1095BListItemResponse; + Form1095C.validateJsonElement(jsonElement); + actualAdapter = adapterForm1095C; match++; - log.log(Level.FINER, "Input data matches schema 'Form1095BListItemResponse'"); + log.log(Level.FINER, "Input data matches schema 'Form1095C'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1095BListItemResponse'", e); + errorMessages.add(String.format("Deserialization for Form1095C failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1095C'", e); } - // deserialize Form1099DivListItemResponse + // deserialize Form1099Div try { // validate the JSON object to see if any exception is thrown - Form1099DivListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099DivListItemResponse; + Form1099Div.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099Div; match++; - log.log(Level.FINER, "Input data matches schema 'Form1099DivListItemResponse'"); + log.log(Level.FINER, "Input data matches schema 'Form1099Div'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099DivListItemResponse'", e); + errorMessages.add(String.format("Deserialization for Form1099Div failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099Div'", e); } - // deserialize Form1099IntListItemResponse + // deserialize Form1099Int try { // validate the JSON object to see if any exception is thrown - Form1099IntListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099IntListItemResponse; + Form1099Int.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099Int; match++; - log.log(Level.FINER, "Input data matches schema 'Form1099IntListItemResponse'"); + log.log(Level.FINER, "Input data matches schema 'Form1099Int'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099IntListItemResponse'", e); + errorMessages.add(String.format("Deserialization for Form1099Int failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099Int'", e); } - // deserialize Form1099KListItemResponse + // deserialize Form1099K try { // validate the JSON object to see if any exception is thrown - Form1099KListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099KListItemResponse; + Form1099K.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099K; match++; - log.log(Level.FINER, "Input data matches schema 'Form1099KListItemResponse'"); + log.log(Level.FINER, "Input data matches schema 'Form1099K'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099KListItemResponse'", e); + errorMessages.add(String.format("Deserialization for Form1099K failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099K'", e); } - // deserialize Form1099MiscListItemResponse + // deserialize Form1099Misc try { // validate the JSON object to see if any exception is thrown - Form1099MiscListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099MiscListItemResponse; + Form1099Misc.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099Misc; match++; - log.log(Level.FINER, "Input data matches schema 'Form1099MiscListItemResponse'"); + log.log(Level.FINER, "Input data matches schema 'Form1099Misc'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099MiscListItemResponse'", e); + errorMessages.add(String.format("Deserialization for Form1099Misc failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099Misc'", e); } - // deserialize Form1099NecListItemResponse + // deserialize Form1099Nec try { // validate the JSON object to see if any exception is thrown - Form1099NecListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099NecListItemResponse; + Form1099Nec.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099Nec; match++; - log.log(Level.FINER, "Input data matches schema 'Form1099NecListItemResponse'"); + log.log(Level.FINER, "Input data matches schema 'Form1099Nec'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099NecListItemResponse'", e); + errorMessages.add(String.format("Deserialization for Form1099Nec failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099Nec'", e); } - // deserialize Form1099RListItemResponse + // deserialize Form1099R try { // validate the JSON object to see if any exception is thrown - Form1099RListItemResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099RListItemResponse; + Form1099R.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099R; match++; - log.log(Level.FINER, "Input data matches schema 'Form1099RListItemResponse'"); + log.log(Level.FINER, "Input data matches schema 'Form1099R'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099RListItemResponse'", e); + errorMessages.add(String.format("Deserialization for Form1099R failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099R'", e); } if (match == 1) { @@ -313,15 +315,15 @@ public Get1099Form200Response(Object o) { } static { - schemas.put("Form1099BaseResponse", Form1099BaseResponse.class); - schemas.put("Form1042SListItemResponse", Form1042SListItemResponse.class); - schemas.put("Form1095BListItemResponse", Form1095BListItemResponse.class); - schemas.put("Form1099DivListItemResponse", Form1099DivListItemResponse.class); - schemas.put("Form1099IntListItemResponse", Form1099IntListItemResponse.class); - schemas.put("Form1099KListItemResponse", Form1099KListItemResponse.class); - schemas.put("Form1099MiscListItemResponse", Form1099MiscListItemResponse.class); - schemas.put("Form1099NecListItemResponse", Form1099NecListItemResponse.class); - schemas.put("Form1099RListItemResponse", Form1099RListItemResponse.class); + schemas.put("Form1042S", Form1042S.class); + schemas.put("Form1095B", Form1095B.class); + schemas.put("Form1095C", Form1095C.class); + schemas.put("Form1099Div", Form1099Div.class); + schemas.put("Form1099Int", Form1099Int.class); + schemas.put("Form1099K", Form1099K.class); + schemas.put("Form1099Misc", Form1099Misc.class); + schemas.put("Form1099Nec", Form1099Nec.class); + schemas.put("Form1099R", Form1099R.class); } @Override @@ -332,65 +334,65 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R * * It could be an instance of the 'oneOf' schemas. */ @Override public void setActualInstance(Object instance) { - if (instance instanceof Form1099BaseResponse) { + if (instance instanceof Form1042S) { super.setActualInstance(instance); return; } - if (instance instanceof Form1042SListItemResponse) { + if (instance instanceof Form1095B) { super.setActualInstance(instance); return; } - if (instance instanceof Form1095BListItemResponse) { + if (instance instanceof Form1095C) { super.setActualInstance(instance); return; } - if (instance instanceof Form1099DivListItemResponse) { + if (instance instanceof Form1099Div) { super.setActualInstance(instance); return; } - if (instance instanceof Form1099IntListItemResponse) { + if (instance instanceof Form1099Int) { super.setActualInstance(instance); return; } - if (instance instanceof Form1099KListItemResponse) { + if (instance instanceof Form1099K) { super.setActualInstance(instance); return; } - if (instance instanceof Form1099MiscListItemResponse) { + if (instance instanceof Form1099Misc) { super.setActualInstance(instance); return; } - if (instance instanceof Form1099NecListItemResponse) { + if (instance instanceof Form1099Nec) { super.setActualInstance(instance); return; } - if (instance instanceof Form1099RListItemResponse) { + if (instance instanceof Form1099R) { super.setActualInstance(instance); return; } - throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + throw new RuntimeException("Invalid instance type. Must be Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R"); } /** * Get the actual instance, which can be the following: - * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R * - * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) + * @return The actual instance (Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R) */ @SuppressWarnings("unchecked") @Override @@ -399,94 +401,94 @@ public Object getActualInstance() { } /** - * Get the actual instance of `Form1099BaseResponse`. If the actual instance is not `Form1099BaseResponse`, + * Get the actual instance of `Form1042S`. If the actual instance is not `Form1042S`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1099BaseResponse` - * @throws ClassCastException if the instance is not `Form1099BaseResponse` + * @return The actual instance of `Form1042S` + * @throws ClassCastException if the instance is not `Form1042S` */ - public Form1099BaseResponse getForm1099BaseResponse() throws ClassCastException { - return (Form1099BaseResponse)super.getActualInstance(); + public Form1042S getForm1042S() throws ClassCastException { + return (Form1042S)super.getActualInstance(); } /** - * Get the actual instance of `Form1042SListItemResponse`. If the actual instance is not `Form1042SListItemResponse`, + * Get the actual instance of `Form1095B`. If the actual instance is not `Form1095B`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1042SListItemResponse` - * @throws ClassCastException if the instance is not `Form1042SListItemResponse` + * @return The actual instance of `Form1095B` + * @throws ClassCastException if the instance is not `Form1095B` */ - public Form1042SListItemResponse getForm1042SListItemResponse() throws ClassCastException { - return (Form1042SListItemResponse)super.getActualInstance(); + public Form1095B getForm1095B() throws ClassCastException { + return (Form1095B)super.getActualInstance(); } /** - * Get the actual instance of `Form1095BListItemResponse`. If the actual instance is not `Form1095BListItemResponse`, + * Get the actual instance of `Form1095C`. If the actual instance is not `Form1095C`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1095BListItemResponse` - * @throws ClassCastException if the instance is not `Form1095BListItemResponse` + * @return The actual instance of `Form1095C` + * @throws ClassCastException if the instance is not `Form1095C` */ - public Form1095BListItemResponse getForm1095BListItemResponse() throws ClassCastException { - return (Form1095BListItemResponse)super.getActualInstance(); + public Form1095C getForm1095C() throws ClassCastException { + return (Form1095C)super.getActualInstance(); } /** - * Get the actual instance of `Form1099DivListItemResponse`. If the actual instance is not `Form1099DivListItemResponse`, + * Get the actual instance of `Form1099Div`. If the actual instance is not `Form1099Div`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1099DivListItemResponse` - * @throws ClassCastException if the instance is not `Form1099DivListItemResponse` + * @return The actual instance of `Form1099Div` + * @throws ClassCastException if the instance is not `Form1099Div` */ - public Form1099DivListItemResponse getForm1099DivListItemResponse() throws ClassCastException { - return (Form1099DivListItemResponse)super.getActualInstance(); + public Form1099Div getForm1099Div() throws ClassCastException { + return (Form1099Div)super.getActualInstance(); } /** - * Get the actual instance of `Form1099IntListItemResponse`. If the actual instance is not `Form1099IntListItemResponse`, + * Get the actual instance of `Form1099Int`. If the actual instance is not `Form1099Int`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1099IntListItemResponse` - * @throws ClassCastException if the instance is not `Form1099IntListItemResponse` + * @return The actual instance of `Form1099Int` + * @throws ClassCastException if the instance is not `Form1099Int` */ - public Form1099IntListItemResponse getForm1099IntListItemResponse() throws ClassCastException { - return (Form1099IntListItemResponse)super.getActualInstance(); + public Form1099Int getForm1099Int() throws ClassCastException { + return (Form1099Int)super.getActualInstance(); } /** - * Get the actual instance of `Form1099KListItemResponse`. If the actual instance is not `Form1099KListItemResponse`, + * Get the actual instance of `Form1099K`. If the actual instance is not `Form1099K`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1099KListItemResponse` - * @throws ClassCastException if the instance is not `Form1099KListItemResponse` + * @return The actual instance of `Form1099K` + * @throws ClassCastException if the instance is not `Form1099K` */ - public Form1099KListItemResponse getForm1099KListItemResponse() throws ClassCastException { - return (Form1099KListItemResponse)super.getActualInstance(); + public Form1099K getForm1099K() throws ClassCastException { + return (Form1099K)super.getActualInstance(); } /** - * Get the actual instance of `Form1099MiscListItemResponse`. If the actual instance is not `Form1099MiscListItemResponse`, + * Get the actual instance of `Form1099Misc`. If the actual instance is not `Form1099Misc`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1099MiscListItemResponse` - * @throws ClassCastException if the instance is not `Form1099MiscListItemResponse` + * @return The actual instance of `Form1099Misc` + * @throws ClassCastException if the instance is not `Form1099Misc` */ - public Form1099MiscListItemResponse getForm1099MiscListItemResponse() throws ClassCastException { - return (Form1099MiscListItemResponse)super.getActualInstance(); + public Form1099Misc getForm1099Misc() throws ClassCastException { + return (Form1099Misc)super.getActualInstance(); } /** - * Get the actual instance of `Form1099NecListItemResponse`. If the actual instance is not `Form1099NecListItemResponse`, + * Get the actual instance of `Form1099Nec`. If the actual instance is not `Form1099Nec`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1099NecListItemResponse` - * @throws ClassCastException if the instance is not `Form1099NecListItemResponse` + * @return The actual instance of `Form1099Nec` + * @throws ClassCastException if the instance is not `Form1099Nec` */ - public Form1099NecListItemResponse getForm1099NecListItemResponse() throws ClassCastException { - return (Form1099NecListItemResponse)super.getActualInstance(); + public Form1099Nec getForm1099Nec() throws ClassCastException { + return (Form1099Nec)super.getActualInstance(); } /** - * Get the actual instance of `Form1099RListItemResponse`. If the actual instance is not `Form1099RListItemResponse`, + * Get the actual instance of `Form1099R`. If the actual instance is not `Form1099R`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1099RListItemResponse` - * @throws ClassCastException if the instance is not `Form1099RListItemResponse` + * @return The actual instance of `Form1099R` + * @throws ClassCastException if the instance is not `Form1099R` */ - public Form1099RListItemResponse getForm1099RListItemResponse() throws ClassCastException { - return (Form1099RListItemResponse)super.getActualInstance(); + public Form1099R getForm1099R() throws ClassCastException { + return (Form1099R)super.getActualInstance(); } /** @@ -499,80 +501,80 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate oneOf schemas one by one int validCount = 0; ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Form1099BaseResponse + // validate the json string with Form1042S try { - Form1099BaseResponse.validateJsonElement(jsonElement); + Form1042S.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1042S failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1042SListItemResponse + // validate the json string with Form1095B try { - Form1042SListItemResponse.validateJsonElement(jsonElement); + Form1095B.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1095B failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1095BListItemResponse + // validate the json string with Form1095C try { - Form1095BListItemResponse.validateJsonElement(jsonElement); + Form1095C.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1095C failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1099DivListItemResponse + // validate the json string with Form1099Div try { - Form1099DivListItemResponse.validateJsonElement(jsonElement); + Form1099Div.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099DivListItemResponse failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1099Div failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1099IntListItemResponse + // validate the json string with Form1099Int try { - Form1099IntListItemResponse.validateJsonElement(jsonElement); + Form1099Int.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099IntListItemResponse failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1099Int failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1099KListItemResponse + // validate the json string with Form1099K try { - Form1099KListItemResponse.validateJsonElement(jsonElement); + Form1099K.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1099K failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1099MiscListItemResponse + // validate the json string with Form1099Misc try { - Form1099MiscListItemResponse.validateJsonElement(jsonElement); + Form1099Misc.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1099Misc failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1099NecListItemResponse + // validate the json string with Form1099Nec try { - Form1099NecListItemResponse.validateJsonElement(jsonElement); + Form1099Nec.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1099Nec failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1099RListItemResponse + // validate the json string with Form1099R try { - Form1099RListItemResponse.validateJsonElement(jsonElement); + Form1099R.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1099R failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Get1099Form200Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099DivListItemResponse, Form1099IntListItemResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for Get1099Form200Response with oneOf schemas: Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099R. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/HttpValidationProblemDetails.java b/src/main/java/Avalara/SDK/model/A1099/V2/HttpValidationProblemDetails.java deleted file mode 100644 index 576305a..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/HttpValidationProblemDetails.java +++ /dev/null @@ -1,454 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * HttpValidationProblemDetails - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class HttpValidationProblemDetails { - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - private Map> errors; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private String title; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private Integer status; - - public static final String SERIALIZED_NAME_DETAIL = "detail"; - @SerializedName(SERIALIZED_NAME_DETAIL) - private String detail; - - public static final String SERIALIZED_NAME_INSTANCE = "instance"; - @SerializedName(SERIALIZED_NAME_INSTANCE) - private String instance; - - public HttpValidationProblemDetails() { - } - - public HttpValidationProblemDetails errors(Map> errors) { - this.errors = errors; - return this; - } - - public HttpValidationProblemDetails putErrorsItem(String key, List errorsItem) { - if (this.errors == null) { - this.errors = new HashMap<>(); - } - this.errors.put(key, errorsItem); - return this; - } - - /** - * Get errors - * @return errors - */ - @javax.annotation.Nullable - public Map> getErrors() { - return errors; - } - - public void setErrors(Map> errors) { - this.errors = errors; - } - - - public HttpValidationProblemDetails type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public HttpValidationProblemDetails title(String title) { - this.title = title; - return this; - } - - /** - * Get title - * @return title - */ - @javax.annotation.Nullable - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - - public HttpValidationProblemDetails status(Integer status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - - public HttpValidationProblemDetails detail(String detail) { - this.detail = detail; - return this; - } - - /** - * Get detail - * @return detail - */ - @javax.annotation.Nullable - public String getDetail() { - return detail; - } - - public void setDetail(String detail) { - this.detail = detail; - } - - - public HttpValidationProblemDetails instance(String instance) { - this.instance = instance; - return this; - } - - /** - * Get instance - * @return instance - */ - @javax.annotation.Nullable - public String getInstance() { - return instance; - } - - public void setInstance(String instance) { - this.instance = instance; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the HttpValidationProblemDetails instance itself - */ - public HttpValidationProblemDetails putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HttpValidationProblemDetails httpValidationProblemDetails = (HttpValidationProblemDetails) o; - return Objects.equals(this.errors, httpValidationProblemDetails.errors) && - Objects.equals(this.type, httpValidationProblemDetails.type) && - Objects.equals(this.title, httpValidationProblemDetails.title) && - Objects.equals(this.status, httpValidationProblemDetails.status) && - Objects.equals(this.detail, httpValidationProblemDetails.detail) && - Objects.equals(this.instance, httpValidationProblemDetails.instance)&& - Objects.equals(this.additionalProperties, httpValidationProblemDetails.additionalProperties); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(errors, type, title, status, detail, instance, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HttpValidationProblemDetails {\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); - sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("title"); - openapiFields.add("status"); - openapiFields.add("detail"); - openapiFields.add("instance"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to HttpValidationProblemDetails - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!HttpValidationProblemDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in HttpValidationProblemDetails is not found in the empty JSON string", HttpValidationProblemDetails.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); - } - if ((jsonObj.get("detail") != null && !jsonObj.get("detail").isJsonNull()) && !jsonObj.get("detail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `detail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("detail").toString())); - } - if ((jsonObj.get("instance") != null && !jsonObj.get("instance").isJsonNull()) && !jsonObj.get("instance").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `instance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instance").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!HttpValidationProblemDetails.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'HttpValidationProblemDetails' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(HttpValidationProblemDetails.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, HttpValidationProblemDetails value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public HttpValidationProblemDetails read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - HttpValidationProblemDetails instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of HttpValidationProblemDetails given an JSON string - * - * @param jsonString JSON string - * @return An instance of HttpValidationProblemDetails - * @throws IOException if the JSON string is invalid with respect to HttpValidationProblemDetails - */ - public static HttpValidationProblemDetails fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, HttpValidationProblemDetails.class); - } - - /** - * Convert an instance of HttpValidationProblemDetails to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ICreateForm1099Request.java b/src/main/java/Avalara/SDK/model/A1099/V2/ICreateForm1099Request.java deleted file mode 100644 index 0afbdbf..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ICreateForm1099Request.java +++ /dev/null @@ -1,370 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1099DivRequest; -import Avalara.SDK.model.A1099.V2.Form1099KRequest; -import Avalara.SDK.model.A1099.V2.Form1099MiscRequest; -import Avalara.SDK.model.A1099.V2.Form1099NecRequest; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import Avalara.SDK.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class ICreateForm1099Request extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(ICreateForm1099Request.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ICreateForm1099Request.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ICreateForm1099Request' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterForm1099DivRequest = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivRequest.class)); - final TypeAdapter adapterForm1099MiscRequest = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscRequest.class)); - final TypeAdapter adapterForm1099KRequest = gson.getDelegateAdapter(this, TypeToken.get(Form1099KRequest.class)); - final TypeAdapter adapterForm1099NecRequest = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ICreateForm1099Request value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Form1099DivRequest` - if (value.getActualInstance() instanceof Form1099DivRequest) { - JsonElement element = adapterForm1099DivRequest.toJsonTree((Form1099DivRequest)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099MiscRequest` - if (value.getActualInstance() instanceof Form1099MiscRequest) { - JsonElement element = adapterForm1099MiscRequest.toJsonTree((Form1099MiscRequest)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099KRequest` - if (value.getActualInstance() instanceof Form1099KRequest) { - JsonElement element = adapterForm1099KRequest.toJsonTree((Form1099KRequest)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099NecRequest` - if (value.getActualInstance() instanceof Form1099NecRequest) { - JsonElement element = adapterForm1099NecRequest.toJsonTree((Form1099NecRequest)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest"); - } - - @Override - public ICreateForm1099Request read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Form1099DivRequest - try { - // validate the JSON object to see if any exception is thrown - Form1099DivRequest.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099DivRequest; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099DivRequest'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099DivRequest failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099DivRequest'", e); - } - // deserialize Form1099MiscRequest - try { - // validate the JSON object to see if any exception is thrown - Form1099MiscRequest.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099MiscRequest; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099MiscRequest'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099MiscRequest failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099MiscRequest'", e); - } - // deserialize Form1099KRequest - try { - // validate the JSON object to see if any exception is thrown - Form1099KRequest.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099KRequest; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099KRequest'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099KRequest failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099KRequest'", e); - } - // deserialize Form1099NecRequest - try { - // validate the JSON object to see if any exception is thrown - Form1099NecRequest.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099NecRequest; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099NecRequest'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099NecRequest failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099NecRequest'", e); - } - - if (match == 1) { - ICreateForm1099Request ret = new ICreateForm1099Request(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for ICreateForm1099Request: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public ICreateForm1099Request() { - super("oneOf", Boolean.FALSE); - } - - public ICreateForm1099Request(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Form1099DivRequest", Form1099DivRequest.class); - schemas.put("Form1099MiscRequest", Form1099MiscRequest.class); - schemas.put("Form1099KRequest", Form1099KRequest.class); - schemas.put("Form1099NecRequest", Form1099NecRequest.class); - } - - @Override - public Map> getSchemas() { - return ICreateForm1099Request.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Form1099DivRequest) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099MiscRequest) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099KRequest) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099NecRequest) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest"); - } - - /** - * Get the actual instance, which can be the following: - * Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest - * - * @return The actual instance (Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Form1099DivRequest`. If the actual instance is not `Form1099DivRequest`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099DivRequest` - * @throws ClassCastException if the instance is not `Form1099DivRequest` - */ - public Form1099DivRequest getForm1099DivRequest() throws ClassCastException { - return (Form1099DivRequest)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099MiscRequest`. If the actual instance is not `Form1099MiscRequest`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099MiscRequest` - * @throws ClassCastException if the instance is not `Form1099MiscRequest` - */ - public Form1099MiscRequest getForm1099MiscRequest() throws ClassCastException { - return (Form1099MiscRequest)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099KRequest`. If the actual instance is not `Form1099KRequest`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099KRequest` - * @throws ClassCastException if the instance is not `Form1099KRequest` - */ - public Form1099KRequest getForm1099KRequest() throws ClassCastException { - return (Form1099KRequest)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099NecRequest`. If the actual instance is not `Form1099NecRequest`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099NecRequest` - * @throws ClassCastException if the instance is not `Form1099NecRequest` - */ - public Form1099NecRequest getForm1099NecRequest() throws ClassCastException { - return (Form1099NecRequest)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ICreateForm1099Request - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Form1099DivRequest - try { - Form1099DivRequest.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099DivRequest failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099MiscRequest - try { - Form1099MiscRequest.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099MiscRequest failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099KRequest - try { - Form1099KRequest.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099KRequest failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099NecRequest - try { - Form1099NecRequest.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099NecRequest failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for ICreateForm1099Request with oneOf schemas: Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of ICreateForm1099Request given an JSON string - * - * @param jsonString JSON string - * @return An instance of ICreateForm1099Request - * @throws IOException if the JSON string is invalid with respect to ICreateForm1099Request - */ - public static ICreateForm1099Request fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ICreateForm1099Request.class); - } - - /** - * Convert an instance of ICreateForm1099Request to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IUpdateForm1099Request.java b/src/main/java/Avalara/SDK/model/A1099/V2/IUpdateForm1099Request.java deleted file mode 100644 index b777152..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IUpdateForm1099Request.java +++ /dev/null @@ -1,370 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.Form1099DivRequest; -import Avalara.SDK.model.A1099.V2.Form1099KRequest; -import Avalara.SDK.model.A1099.V2.Form1099MiscRequest; -import Avalara.SDK.model.A1099.V2.Form1099NecRequest; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingRequest; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import Avalara.SDK.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class IUpdateForm1099Request extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(IUpdateForm1099Request.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IUpdateForm1099Request.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IUpdateForm1099Request' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterForm1099DivRequest = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivRequest.class)); - final TypeAdapter adapterForm1099MiscRequest = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscRequest.class)); - final TypeAdapter adapterForm1099KRequest = gson.getDelegateAdapter(this, TypeToken.get(Form1099KRequest.class)); - final TypeAdapter adapterForm1099NecRequest = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IUpdateForm1099Request value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `Form1099DivRequest` - if (value.getActualInstance() instanceof Form1099DivRequest) { - JsonElement element = adapterForm1099DivRequest.toJsonTree((Form1099DivRequest)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099MiscRequest` - if (value.getActualInstance() instanceof Form1099MiscRequest) { - JsonElement element = adapterForm1099MiscRequest.toJsonTree((Form1099MiscRequest)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099KRequest` - if (value.getActualInstance() instanceof Form1099KRequest) { - JsonElement element = adapterForm1099KRequest.toJsonTree((Form1099KRequest)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099NecRequest` - if (value.getActualInstance() instanceof Form1099NecRequest) { - JsonElement element = adapterForm1099NecRequest.toJsonTree((Form1099NecRequest)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest"); - } - - @Override - public IUpdateForm1099Request read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize Form1099DivRequest - try { - // validate the JSON object to see if any exception is thrown - Form1099DivRequest.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099DivRequest; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099DivRequest'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099DivRequest failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099DivRequest'", e); - } - // deserialize Form1099MiscRequest - try { - // validate the JSON object to see if any exception is thrown - Form1099MiscRequest.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099MiscRequest; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099MiscRequest'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099MiscRequest failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099MiscRequest'", e); - } - // deserialize Form1099KRequest - try { - // validate the JSON object to see if any exception is thrown - Form1099KRequest.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099KRequest; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099KRequest'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099KRequest failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099KRequest'", e); - } - // deserialize Form1099NecRequest - try { - // validate the JSON object to see if any exception is thrown - Form1099NecRequest.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099NecRequest; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099NecRequest'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099NecRequest failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099NecRequest'", e); - } - - if (match == 1) { - IUpdateForm1099Request ret = new IUpdateForm1099Request(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for IUpdateForm1099Request: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public IUpdateForm1099Request() { - super("oneOf", Boolean.FALSE); - } - - public IUpdateForm1099Request(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("Form1099DivRequest", Form1099DivRequest.class); - schemas.put("Form1099MiscRequest", Form1099MiscRequest.class); - schemas.put("Form1099KRequest", Form1099KRequest.class); - schemas.put("Form1099NecRequest", Form1099NecRequest.class); - } - - @Override - public Map> getSchemas() { - return IUpdateForm1099Request.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof Form1099DivRequest) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099MiscRequest) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099KRequest) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099NecRequest) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest"); - } - - /** - * Get the actual instance, which can be the following: - * Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest - * - * @return The actual instance (Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `Form1099DivRequest`. If the actual instance is not `Form1099DivRequest`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099DivRequest` - * @throws ClassCastException if the instance is not `Form1099DivRequest` - */ - public Form1099DivRequest getForm1099DivRequest() throws ClassCastException { - return (Form1099DivRequest)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099MiscRequest`. If the actual instance is not `Form1099MiscRequest`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099MiscRequest` - * @throws ClassCastException if the instance is not `Form1099MiscRequest` - */ - public Form1099MiscRequest getForm1099MiscRequest() throws ClassCastException { - return (Form1099MiscRequest)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099KRequest`. If the actual instance is not `Form1099KRequest`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099KRequest` - * @throws ClassCastException if the instance is not `Form1099KRequest` - */ - public Form1099KRequest getForm1099KRequest() throws ClassCastException { - return (Form1099KRequest)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099NecRequest`. If the actual instance is not `Form1099NecRequest`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099NecRequest` - * @throws ClassCastException if the instance is not `Form1099NecRequest` - */ - public Form1099NecRequest getForm1099NecRequest() throws ClassCastException { - return (Form1099NecRequest)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IUpdateForm1099Request - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Form1099DivRequest - try { - Form1099DivRequest.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099DivRequest failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099MiscRequest - try { - Form1099MiscRequest.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099MiscRequest failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099KRequest - try { - Form1099KRequest.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099KRequest failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099NecRequest - try { - Form1099NecRequest.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099NecRequest failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for IUpdateForm1099Request with oneOf schemas: Form1099DivRequest, Form1099KRequest, Form1099MiscRequest, Form1099NecRequest. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of IUpdateForm1099Request given an JSON string - * - * @param jsonString JSON string - * @return An instance of IUpdateForm1099Request - * @throws IOException if the JSON string is invalid with respect to IUpdateForm1099Request - */ - public static IUpdateForm1099Request fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IUpdateForm1099Request.class); - } - - /** - * Convert an instance of IUpdateForm1099Request to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IncludedBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/IncludedBase.java deleted file mode 100644 index dce0fd3..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IncludedBase.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * IncludedBase - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class IncludedBase { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public IncludedBase() { - } - - public IncludedBase id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public IncludedBase type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IncludedBase includedBase = (IncludedBase) o; - return Objects.equals(this.id, includedBase.id) && - Objects.equals(this.type, includedBase.type); - } - - @Override - public int hashCode() { - return Objects.hash(id, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IncludedBase {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("type"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IncludedBase - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IncludedBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IncludedBase is not found in the empty JSON string", IncludedBase.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IncludedBase.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IncludedBase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IncludedBase.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IncludedBase' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IncludedBase.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IncludedBase value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IncludedBase read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IncludedBase given an JSON string - * - * @param jsonString JSON string - * @return An instance of IncludedBase - * @throws IOException if the JSON string is invalid with respect to IncludedBase - */ - public static IncludedBase fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IncludedBase.class); - } - - /** - * Convert an instance of IncludedBase to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java index e4a2045..4c92997 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java @@ -54,7 +54,7 @@ import Avalara.SDK.JSON; /** - * IntermediaryOrFlowThrough + * Intermediary or flow-through entity information for tax forms */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class IntermediaryOrFlowThrough { @@ -111,7 +111,7 @@ public IntermediaryOrFlowThrough ein(String ein) { } /** - * Get ein + * EIN (Employer Identification Number) of the intermediary or flow-through entity * @return ein */ @javax.annotation.Nullable @@ -130,7 +130,7 @@ public IntermediaryOrFlowThrough chap3StatusCode(String chap3StatusCode) { } /** - * Get chap3StatusCode + * Chapter 3 status code for the intermediary or flow-through entity * @return chap3StatusCode */ @javax.annotation.Nullable @@ -149,7 +149,7 @@ public IntermediaryOrFlowThrough chap4StatusCode(String chap4StatusCode) { } /** - * Get chap4StatusCode + * Chapter 4 status code for the intermediary or flow-through entity * @return chap4StatusCode */ @javax.annotation.Nullable @@ -168,7 +168,7 @@ public IntermediaryOrFlowThrough name(String name) { } /** - * Get name + * Name of the intermediary or flow-through entity * @return name */ @javax.annotation.Nullable @@ -187,7 +187,7 @@ public IntermediaryOrFlowThrough giin(String giin) { } /** - * Get giin + * GIIN (Global Intermediary Identification Number) of the intermediary or flow-through entity * @return giin */ @javax.annotation.Nullable @@ -206,7 +206,7 @@ public IntermediaryOrFlowThrough countryCode(String countryCode) { } /** - * Get countryCode + * Country code for the intermediary or flow-through entity * @return countryCode */ @javax.annotation.Nullable @@ -225,7 +225,7 @@ public IntermediaryOrFlowThrough foreignTin(String foreignTin) { } /** - * Get foreignTin + * Foreign TIN of the intermediary or flow-through entity * @return foreignTin */ @javax.annotation.Nullable @@ -244,7 +244,7 @@ public IntermediaryOrFlowThrough address(String address) { } /** - * Get address + * Address of the intermediary or flow-through entity * @return address */ @javax.annotation.Nullable @@ -263,7 +263,7 @@ public IntermediaryOrFlowThrough city(String city) { } /** - * Get city + * City of the intermediary or flow-through entity * @return city */ @javax.annotation.Nullable @@ -282,7 +282,7 @@ public IntermediaryOrFlowThrough state(String state) { } /** - * Get state + * State of the intermediary or flow-through entity * @return state */ @javax.annotation.Nullable @@ -301,7 +301,7 @@ public IntermediaryOrFlowThrough zip(String zip) { } /** - * Get zip + * Zip code of the intermediary or flow-through entity * @return zip */ @javax.annotation.Nullable diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughRequest.java deleted file mode 100644 index fedaa9c..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughRequest.java +++ /dev/null @@ -1,514 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * IntermediaryOrFlowThroughRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class IntermediaryOrFlowThroughRequest { - public static final String SERIALIZED_NAME_EIN = "ein"; - @SerializedName(SERIALIZED_NAME_EIN) - private String ein; - - public static final String SERIALIZED_NAME_CHAP3_STATUS_CODE = "chap3StatusCode"; - @SerializedName(SERIALIZED_NAME_CHAP3_STATUS_CODE) - private String chap3StatusCode; - - public static final String SERIALIZED_NAME_CHAP4_STATUS_CODE = "chap4StatusCode"; - @SerializedName(SERIALIZED_NAME_CHAP4_STATUS_CODE) - private String chap4StatusCode; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_GIIN = "giin"; - @SerializedName(SERIALIZED_NAME_GIIN) - private String giin; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FOREIGN_TIN = "foreignTin"; - @SerializedName(SERIALIZED_NAME_FOREIGN_TIN) - private String foreignTin; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public IntermediaryOrFlowThroughRequest() { - } - - public IntermediaryOrFlowThroughRequest ein(String ein) { - this.ein = ein; - return this; - } - - /** - * Get ein - * @return ein - */ - @javax.annotation.Nullable - public String getEin() { - return ein; - } - - public void setEin(String ein) { - this.ein = ein; - } - - - public IntermediaryOrFlowThroughRequest chap3StatusCode(String chap3StatusCode) { - this.chap3StatusCode = chap3StatusCode; - return this; - } - - /** - * Get chap3StatusCode - * @return chap3StatusCode - */ - @javax.annotation.Nullable - public String getChap3StatusCode() { - return chap3StatusCode; - } - - public void setChap3StatusCode(String chap3StatusCode) { - this.chap3StatusCode = chap3StatusCode; - } - - - public IntermediaryOrFlowThroughRequest chap4StatusCode(String chap4StatusCode) { - this.chap4StatusCode = chap4StatusCode; - return this; - } - - /** - * Get chap4StatusCode - * @return chap4StatusCode - */ - @javax.annotation.Nullable - public String getChap4StatusCode() { - return chap4StatusCode; - } - - public void setChap4StatusCode(String chap4StatusCode) { - this.chap4StatusCode = chap4StatusCode; - } - - - public IntermediaryOrFlowThroughRequest name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public IntermediaryOrFlowThroughRequest giin(String giin) { - this.giin = giin; - return this; - } - - /** - * Get giin - * @return giin - */ - @javax.annotation.Nullable - public String getGiin() { - return giin; - } - - public void setGiin(String giin) { - this.giin = giin; - } - - - public IntermediaryOrFlowThroughRequest countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public IntermediaryOrFlowThroughRequest foreignTin(String foreignTin) { - this.foreignTin = foreignTin; - return this; - } - - /** - * Get foreignTin - * @return foreignTin - */ - @javax.annotation.Nullable - public String getForeignTin() { - return foreignTin; - } - - public void setForeignTin(String foreignTin) { - this.foreignTin = foreignTin; - } - - - public IntermediaryOrFlowThroughRequest address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public IntermediaryOrFlowThroughRequest city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public IntermediaryOrFlowThroughRequest state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public IntermediaryOrFlowThroughRequest zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IntermediaryOrFlowThroughRequest intermediaryOrFlowThroughRequest = (IntermediaryOrFlowThroughRequest) o; - return Objects.equals(this.ein, intermediaryOrFlowThroughRequest.ein) && - Objects.equals(this.chap3StatusCode, intermediaryOrFlowThroughRequest.chap3StatusCode) && - Objects.equals(this.chap4StatusCode, intermediaryOrFlowThroughRequest.chap4StatusCode) && - Objects.equals(this.name, intermediaryOrFlowThroughRequest.name) && - Objects.equals(this.giin, intermediaryOrFlowThroughRequest.giin) && - Objects.equals(this.countryCode, intermediaryOrFlowThroughRequest.countryCode) && - Objects.equals(this.foreignTin, intermediaryOrFlowThroughRequest.foreignTin) && - Objects.equals(this.address, intermediaryOrFlowThroughRequest.address) && - Objects.equals(this.city, intermediaryOrFlowThroughRequest.city) && - Objects.equals(this.state, intermediaryOrFlowThroughRequest.state) && - Objects.equals(this.zip, intermediaryOrFlowThroughRequest.zip); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(ein, chap3StatusCode, chap4StatusCode, name, giin, countryCode, foreignTin, address, city, state, zip); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IntermediaryOrFlowThroughRequest {\n"); - sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); - sb.append(" chap3StatusCode: ").append(toIndentedString(chap3StatusCode)).append("\n"); - sb.append(" chap4StatusCode: ").append(toIndentedString(chap4StatusCode)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" giin: ").append(toIndentedString(giin)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" foreignTin: ").append(toIndentedString(foreignTin)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ein"); - openapiFields.add("chap3StatusCode"); - openapiFields.add("chap4StatusCode"); - openapiFields.add("name"); - openapiFields.add("giin"); - openapiFields.add("countryCode"); - openapiFields.add("foreignTin"); - openapiFields.add("address"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IntermediaryOrFlowThroughRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IntermediaryOrFlowThroughRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IntermediaryOrFlowThroughRequest is not found in the empty JSON string", IntermediaryOrFlowThroughRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IntermediaryOrFlowThroughRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IntermediaryOrFlowThroughRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); - } - if ((jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) && !jsonObj.get("chap3StatusCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chap3StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap3StatusCode").toString())); - } - if ((jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) && !jsonObj.get("chap4StatusCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chap4StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap4StatusCode").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("giin") != null && !jsonObj.get("giin").isJsonNull()) && !jsonObj.get("giin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `giin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("giin").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("foreignTin") != null && !jsonObj.get("foreignTin").isJsonNull()) && !jsonObj.get("foreignTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTin").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IntermediaryOrFlowThroughRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IntermediaryOrFlowThroughRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IntermediaryOrFlowThroughRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IntermediaryOrFlowThroughRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IntermediaryOrFlowThroughRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IntermediaryOrFlowThroughRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of IntermediaryOrFlowThroughRequest - * @throws IOException if the JSON string is invalid with respect to IntermediaryOrFlowThroughRequest - */ - public static IntermediaryOrFlowThroughRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IntermediaryOrFlowThroughRequest.class); - } - - /** - * Convert an instance of IntermediaryOrFlowThroughRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughResponse.java deleted file mode 100644 index 020d809..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughResponse.java +++ /dev/null @@ -1,514 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * IntermediaryOrFlowThroughResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class IntermediaryOrFlowThroughResponse { - public static final String SERIALIZED_NAME_EIN = "ein"; - @SerializedName(SERIALIZED_NAME_EIN) - private String ein; - - public static final String SERIALIZED_NAME_CHAP3_STATUS_CODE = "chap3StatusCode"; - @SerializedName(SERIALIZED_NAME_CHAP3_STATUS_CODE) - private String chap3StatusCode; - - public static final String SERIALIZED_NAME_CHAP4_STATUS_CODE = "chap4StatusCode"; - @SerializedName(SERIALIZED_NAME_CHAP4_STATUS_CODE) - private String chap4StatusCode; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_GIIN = "giin"; - @SerializedName(SERIALIZED_NAME_GIIN) - private String giin; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_FOREIGN_TIN = "foreignTin"; - @SerializedName(SERIALIZED_NAME_FOREIGN_TIN) - private String foreignTin; - - public static final String SERIALIZED_NAME_ADDRESS = "address"; - @SerializedName(SERIALIZED_NAME_ADDRESS) - private String address; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_ZIP = "zip"; - @SerializedName(SERIALIZED_NAME_ZIP) - private String zip; - - public IntermediaryOrFlowThroughResponse() { - } - - public IntermediaryOrFlowThroughResponse ein(String ein) { - this.ein = ein; - return this; - } - - /** - * Get ein - * @return ein - */ - @javax.annotation.Nullable - public String getEin() { - return ein; - } - - public void setEin(String ein) { - this.ein = ein; - } - - - public IntermediaryOrFlowThroughResponse chap3StatusCode(String chap3StatusCode) { - this.chap3StatusCode = chap3StatusCode; - return this; - } - - /** - * Get chap3StatusCode - * @return chap3StatusCode - */ - @javax.annotation.Nullable - public String getChap3StatusCode() { - return chap3StatusCode; - } - - public void setChap3StatusCode(String chap3StatusCode) { - this.chap3StatusCode = chap3StatusCode; - } - - - public IntermediaryOrFlowThroughResponse chap4StatusCode(String chap4StatusCode) { - this.chap4StatusCode = chap4StatusCode; - return this; - } - - /** - * Get chap4StatusCode - * @return chap4StatusCode - */ - @javax.annotation.Nullable - public String getChap4StatusCode() { - return chap4StatusCode; - } - - public void setChap4StatusCode(String chap4StatusCode) { - this.chap4StatusCode = chap4StatusCode; - } - - - public IntermediaryOrFlowThroughResponse name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public IntermediaryOrFlowThroughResponse giin(String giin) { - this.giin = giin; - return this; - } - - /** - * Get giin - * @return giin - */ - @javax.annotation.Nullable - public String getGiin() { - return giin; - } - - public void setGiin(String giin) { - this.giin = giin; - } - - - public IntermediaryOrFlowThroughResponse countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * Get countryCode - * @return countryCode - */ - @javax.annotation.Nullable - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public IntermediaryOrFlowThroughResponse foreignTin(String foreignTin) { - this.foreignTin = foreignTin; - return this; - } - - /** - * Get foreignTin - * @return foreignTin - */ - @javax.annotation.Nullable - public String getForeignTin() { - return foreignTin; - } - - public void setForeignTin(String foreignTin) { - this.foreignTin = foreignTin; - } - - - public IntermediaryOrFlowThroughResponse address(String address) { - this.address = address; - return this; - } - - /** - * Get address - * @return address - */ - @javax.annotation.Nullable - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - - public IntermediaryOrFlowThroughResponse city(String city) { - this.city = city; - return this; - } - - /** - * Get city - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public IntermediaryOrFlowThroughResponse state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public IntermediaryOrFlowThroughResponse zip(String zip) { - this.zip = zip; - return this; - } - - /** - * Get zip - * @return zip - */ - @javax.annotation.Nullable - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - IntermediaryOrFlowThroughResponse intermediaryOrFlowThroughResponse = (IntermediaryOrFlowThroughResponse) o; - return Objects.equals(this.ein, intermediaryOrFlowThroughResponse.ein) && - Objects.equals(this.chap3StatusCode, intermediaryOrFlowThroughResponse.chap3StatusCode) && - Objects.equals(this.chap4StatusCode, intermediaryOrFlowThroughResponse.chap4StatusCode) && - Objects.equals(this.name, intermediaryOrFlowThroughResponse.name) && - Objects.equals(this.giin, intermediaryOrFlowThroughResponse.giin) && - Objects.equals(this.countryCode, intermediaryOrFlowThroughResponse.countryCode) && - Objects.equals(this.foreignTin, intermediaryOrFlowThroughResponse.foreignTin) && - Objects.equals(this.address, intermediaryOrFlowThroughResponse.address) && - Objects.equals(this.city, intermediaryOrFlowThroughResponse.city) && - Objects.equals(this.state, intermediaryOrFlowThroughResponse.state) && - Objects.equals(this.zip, intermediaryOrFlowThroughResponse.zip); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(ein, chap3StatusCode, chap4StatusCode, name, giin, countryCode, foreignTin, address, city, state, zip); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class IntermediaryOrFlowThroughResponse {\n"); - sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); - sb.append(" chap3StatusCode: ").append(toIndentedString(chap3StatusCode)).append("\n"); - sb.append(" chap4StatusCode: ").append(toIndentedString(chap4StatusCode)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" giin: ").append(toIndentedString(giin)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" foreignTin: ").append(toIndentedString(foreignTin)).append("\n"); - sb.append(" address: ").append(toIndentedString(address)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("ein"); - openapiFields.add("chap3StatusCode"); - openapiFields.add("chap4StatusCode"); - openapiFields.add("name"); - openapiFields.add("giin"); - openapiFields.add("countryCode"); - openapiFields.add("foreignTin"); - openapiFields.add("address"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to IntermediaryOrFlowThroughResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!IntermediaryOrFlowThroughResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in IntermediaryOrFlowThroughResponse is not found in the empty JSON string", IntermediaryOrFlowThroughResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!IntermediaryOrFlowThroughResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IntermediaryOrFlowThroughResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); - } - if ((jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) && !jsonObj.get("chap3StatusCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chap3StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap3StatusCode").toString())); - } - if ((jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) && !jsonObj.get("chap4StatusCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `chap4StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap4StatusCode").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("giin") != null && !jsonObj.get("giin").isJsonNull()) && !jsonObj.get("giin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `giin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("giin").toString())); - } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if ((jsonObj.get("foreignTin") != null && !jsonObj.get("foreignTin").isJsonNull()) && !jsonObj.get("foreignTin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `foreignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTin").toString())); - } - if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!IntermediaryOrFlowThroughResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'IntermediaryOrFlowThroughResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(IntermediaryOrFlowThroughResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, IntermediaryOrFlowThroughResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public IntermediaryOrFlowThroughResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of IntermediaryOrFlowThroughResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of IntermediaryOrFlowThroughResponse - * @throws IOException if the JSON string is invalid with respect to IntermediaryOrFlowThroughResponse - */ - public static IntermediaryOrFlowThroughResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, IntermediaryOrFlowThroughResponse.class); - } - - /** - * Convert an instance of IntermediaryOrFlowThroughResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerCommand.java b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerCommand.java index f264092..17e3247 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerCommand.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerCommand.java @@ -62,9 +62,9 @@ public class IssuerCommand { @SerializedName(SERIALIZED_NAME_NAME) private String name; - public static final String SERIALIZED_NAME_NAME_DBA = "nameDba"; - @SerializedName(SERIALIZED_NAME_NAME_DBA) - private String nameDba; + public static final String SERIALIZED_NAME_DBA_NAME = "dbaName"; + @SerializedName(SERIALIZED_NAME_DBA_NAME) + private String dbaName; public static final String SERIALIZED_NAME_TIN = "tin"; @SerializedName(SERIALIZED_NAME_TIN) @@ -127,7 +127,7 @@ public IssuerCommand name(String name) { } /** - * Legal name, not DBA + * Legal name. Not the DBA name. * @return name */ @javax.annotation.Nullable @@ -140,22 +140,22 @@ public void setName(String name) { } - public IssuerCommand nameDba(String nameDba) { - this.nameDba = nameDba; + public IssuerCommand dbaName(String dbaName) { + this.dbaName = dbaName; return this; } /** - * Optional DBA name or continuation of a long legal name - * @return nameDba + * Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. + * @return dbaName */ @javax.annotation.Nullable - public String getNameDba() { - return nameDba; + public String getDbaName() { + return dbaName; } - public void setNameDba(String nameDba) { - this.nameDba = nameDba; + public void setDbaName(String dbaName) { + this.dbaName = dbaName; } @@ -165,7 +165,7 @@ public IssuerCommand tin(String tin) { } /** - * Tax identification number + * Federal Tax Identification Number (TIN). * @return tin */ @javax.annotation.Nullable @@ -184,7 +184,7 @@ public IssuerCommand referenceId(String referenceId) { } /** - * Optional identifier for your reference, never shown to any agency or recipient. We will also prefix download filenames with this value, if present. Can only include letters, numbers, dashes, underscores and spaces. + * Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. * @return referenceId */ @javax.annotation.Nullable @@ -203,7 +203,7 @@ public IssuerCommand telephone(String telephone) { } /** - * Telephone number + * Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. * @return telephone */ @javax.annotation.Nullable @@ -222,7 +222,7 @@ public IssuerCommand taxYear(Integer taxYear) { } /** - * Tax year + * Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. * @return taxYear */ @javax.annotation.Nullable @@ -241,7 +241,7 @@ public IssuerCommand countryCode(String countryCode) { } /** - * If there is a transfer agent, use the shipping address of the transfer agent. + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. * @return countryCode */ @javax.annotation.Nullable @@ -260,7 +260,7 @@ public IssuerCommand email(String email) { } /** - * Email address + * Contact email address. For recipient inquiries. * @return email */ @javax.annotation.Nullable @@ -279,7 +279,7 @@ public IssuerCommand address(String address) { } /** - * Address + * Address. * @return address */ @javax.annotation.Nullable @@ -298,7 +298,7 @@ public IssuerCommand city(String city) { } /** - * City + * City. * @return city */ @javax.annotation.Nullable @@ -317,7 +317,7 @@ public IssuerCommand state(String state) { } /** - * State + * Two-letter US state or Canadian province code (required for US/CA addresses). * @return state */ @javax.annotation.Nullable @@ -336,7 +336,7 @@ public IssuerCommand zip(String zip) { } /** - * Zip code + * ZIP/postal code. * @return zip */ @javax.annotation.Nullable @@ -355,7 +355,7 @@ public IssuerCommand foreignProvince(String foreignProvince) { } /** - * Foreign province + * Province or region for non-US/CA addresses. * @return foreignProvince */ @javax.annotation.Nullable @@ -374,7 +374,7 @@ public IssuerCommand transferAgentName(String transferAgentName) { } /** - * Transfer Agent's Name + * Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. * @return transferAgentName */ @javax.annotation.Nullable @@ -393,7 +393,7 @@ public IssuerCommand lastFiling(Boolean lastFiling) { } /** - * Last year of filing for this payer + * Indicates if this is the issuer's final year filing. * @return lastFiling */ @javax.annotation.Nullable @@ -417,7 +417,7 @@ public boolean equals(Object o) { } IssuerCommand issuerCommand = (IssuerCommand) o; return Objects.equals(this.name, issuerCommand.name) && - Objects.equals(this.nameDba, issuerCommand.nameDba) && + Objects.equals(this.dbaName, issuerCommand.dbaName) && Objects.equals(this.tin, issuerCommand.tin) && Objects.equals(this.referenceId, issuerCommand.referenceId) && Objects.equals(this.telephone, issuerCommand.telephone) && @@ -439,7 +439,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, nameDba, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling); + return Objects.hash(name, dbaName, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling); } private static int hashCodeNullable(JsonNullable a) { @@ -454,7 +454,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IssuerCommand {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" nameDba: ").append(toIndentedString(nameDba)).append("\n"); + sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n"); @@ -491,7 +491,7 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("name"); - openapiFields.add("nameDba"); + openapiFields.add("dbaName"); openapiFields.add("tin"); openapiFields.add("referenceId"); openapiFields.add("telephone"); @@ -508,6 +508,15 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("telephone"); + openapiRequiredFields.add("taxYear"); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("state"); + openapiRequiredFields.add("zip"); + openapiRequiredFields.add("lastFiling"); } /** @@ -530,12 +539,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IssuerCommand` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : IssuerCommand.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if ((jsonObj.get("nameDba") != null && !jsonObj.get("nameDba").isJsonNull()) && !jsonObj.get("nameDba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nameDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nameDba").toString())); + if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java index fc4ef2f..c3b4988 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java @@ -63,13 +63,21 @@ public class IssuerResponse { @SerializedName(SERIALIZED_NAME_ID) private String id; + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; + public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; - public static final String SERIALIZED_NAME_NAME_DBA = "nameDba"; - @SerializedName(SERIALIZED_NAME_NAME_DBA) - private String nameDba; + public static final String SERIALIZED_NAME_DBA_NAME = "dbaName"; + @SerializedName(SERIALIZED_NAME_DBA_NAME) + private String dbaName; public static final String SERIALIZED_NAME_TIN = "tin"; @SerializedName(SERIALIZED_NAME_TIN) @@ -123,30 +131,16 @@ public class IssuerResponse { @SerializedName(SERIALIZED_NAME_LAST_FILING) private Boolean lastFiling; - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - public IssuerResponse() { } - public IssuerResponse( - String id, - OffsetDateTime createdAt, - OffsetDateTime updatedAt - ) { - this(); + public IssuerResponse id(String id) { this.id = id; - this.createdAt = createdAt; - this.updatedAt = updatedAt; + return this; } /** - * Unique identifier set when the record is created + * Unique identifier set when the record is created. * @return id */ @javax.annotation.Nullable @@ -154,6 +148,47 @@ public String getId() { return id; } + public void setId(String id) { + this.id = id; + } + + + public IssuerResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Date time when the record was created. + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public IssuerResponse updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Date time when the record was last updated. + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } public IssuerResponse name(String name) { @@ -162,7 +197,7 @@ public IssuerResponse name(String name) { } /** - * Legal name, not DBA + * Legal name. Not the DBA name. * @return name */ @javax.annotation.Nullable @@ -175,22 +210,22 @@ public void setName(String name) { } - public IssuerResponse nameDba(String nameDba) { - this.nameDba = nameDba; + public IssuerResponse dbaName(String dbaName) { + this.dbaName = dbaName; return this; } /** - * Optional DBA name or continuation of a long legal name - * @return nameDba + * Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. + * @return dbaName */ @javax.annotation.Nullable - public String getNameDba() { - return nameDba; + public String getDbaName() { + return dbaName; } - public void setNameDba(String nameDba) { - this.nameDba = nameDba; + public void setDbaName(String dbaName) { + this.dbaName = dbaName; } @@ -200,7 +235,7 @@ public IssuerResponse tin(String tin) { } /** - * Tax identification number + * Federal Tax Identification Number (TIN). * @return tin */ @javax.annotation.Nullable @@ -219,7 +254,7 @@ public IssuerResponse referenceId(String referenceId) { } /** - * Optional identifier for your reference, never shown to any agency or recipient. We will also prefix download filenames with this value, if present. Can only include letters, numbers, dashes, underscores and spaces. + * Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. * @return referenceId */ @javax.annotation.Nullable @@ -238,7 +273,7 @@ public IssuerResponse telephone(String telephone) { } /** - * Telephone number + * Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. * @return telephone */ @javax.annotation.Nullable @@ -257,7 +292,7 @@ public IssuerResponse taxYear(Integer taxYear) { } /** - * Tax year + * Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. * @return taxYear */ @javax.annotation.Nullable @@ -276,7 +311,7 @@ public IssuerResponse countryCode(String countryCode) { } /** - * If there is a transfer agent, use the address of the transfer agent. + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. * @return countryCode */ @javax.annotation.Nullable @@ -295,7 +330,7 @@ public IssuerResponse email(String email) { } /** - * Email address + * Contact email address. For recipient inquiries. * @return email */ @javax.annotation.Nullable @@ -314,7 +349,7 @@ public IssuerResponse address(String address) { } /** - * Address + * Address. * @return address */ @javax.annotation.Nullable @@ -333,7 +368,7 @@ public IssuerResponse city(String city) { } /** - * City + * City. * @return city */ @javax.annotation.Nullable @@ -352,7 +387,7 @@ public IssuerResponse state(String state) { } /** - * State + * Two-letter US state or Canadian province code (required for US/CA addresses). * @return state */ @javax.annotation.Nullable @@ -371,7 +406,7 @@ public IssuerResponse zip(String zip) { } /** - * Zip code + * ZIP/postal code. * @return zip */ @javax.annotation.Nullable @@ -390,7 +425,7 @@ public IssuerResponse foreignProvince(String foreignProvince) { } /** - * Foreign province + * Province or region for non-US/CA addresses. * @return foreignProvince */ @javax.annotation.Nullable @@ -409,7 +444,7 @@ public IssuerResponse transferAgentName(String transferAgentName) { } /** - * Transfer Agent's Name + * Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. * @return transferAgentName */ @javax.annotation.Nullable @@ -428,7 +463,7 @@ public IssuerResponse lastFiling(Boolean lastFiling) { } /** - * Last year of filing for this payer + * Indicates if this is the issuer's final year filing. * @return lastFiling */ @javax.annotation.Nullable @@ -441,28 +476,6 @@ public void setLastFiling(Boolean lastFiling) { } - /** - * Date time when the issuer was created - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - - - /** - * Date time when the issuer was updated - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - - @Override public boolean equals(Object o) { @@ -474,8 +487,10 @@ public boolean equals(Object o) { } IssuerResponse issuerResponse = (IssuerResponse) o; return Objects.equals(this.id, issuerResponse.id) && + Objects.equals(this.createdAt, issuerResponse.createdAt) && + Objects.equals(this.updatedAt, issuerResponse.updatedAt) && Objects.equals(this.name, issuerResponse.name) && - Objects.equals(this.nameDba, issuerResponse.nameDba) && + Objects.equals(this.dbaName, issuerResponse.dbaName) && Objects.equals(this.tin, issuerResponse.tin) && Objects.equals(this.referenceId, issuerResponse.referenceId) && Objects.equals(this.telephone, issuerResponse.telephone) && @@ -488,9 +503,7 @@ public boolean equals(Object o) { Objects.equals(this.zip, issuerResponse.zip) && Objects.equals(this.foreignProvince, issuerResponse.foreignProvince) && Objects.equals(this.transferAgentName, issuerResponse.transferAgentName) && - Objects.equals(this.lastFiling, issuerResponse.lastFiling) && - Objects.equals(this.createdAt, issuerResponse.createdAt) && - Objects.equals(this.updatedAt, issuerResponse.updatedAt); + Objects.equals(this.lastFiling, issuerResponse.lastFiling); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -499,7 +512,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, name, nameDba, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling, createdAt, updatedAt); + return Objects.hash(id, createdAt, updatedAt, name, dbaName, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling); } private static int hashCodeNullable(JsonNullable a) { @@ -514,8 +527,10 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IssuerResponse {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" nameDba: ").append(toIndentedString(nameDba)).append("\n"); + sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n"); @@ -529,8 +544,6 @@ public String toString() { sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); sb.append(" transferAgentName: ").append(toIndentedString(transferAgentName)).append("\n"); sb.append(" lastFiling: ").append(toIndentedString(lastFiling)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); } @@ -553,9 +566,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("dbaName"); + openapiFields.add("tin"); + openapiFields.add("referenceId"); + openapiFields.add("telephone"); + openapiFields.add("taxYear"); + openapiFields.add("countryCode"); + openapiFields.add("email"); + openapiFields.add("address"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("foreignProvince"); + openapiFields.add("transferAgentName"); + openapiFields.add("lastFiling"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("telephone"); + openapiRequiredFields.add("taxYear"); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("state"); + openapiRequiredFields.add("zip"); + openapiRequiredFields.add("lastFiling"); } /** @@ -578,6 +615,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IssuerResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : IssuerResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); @@ -585,8 +629,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if ((jsonObj.get("nameDba") != null && !jsonObj.get("nameDba").isJsonNull()) && !jsonObj.get("nameDba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nameDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nameDba").toString())); + if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); } if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/JobResult.java b/src/main/java/Avalara/SDK/model/A1099/V2/JobResponse.java similarity index 63% rename from src/main/java/Avalara/SDK/model/A1099/V2/JobResult.java rename to src/main/java/Avalara/SDK/model/A1099/V2/JobResponse.java index d5c129a..81c0699 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/JobResult.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/JobResponse.java @@ -20,13 +20,16 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.Get1099Form200Response; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -54,10 +57,10 @@ import Avalara.SDK.JSON; /** - * JobResult + * Response model for job operations */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class JobResult { +public class JobResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) private String id; @@ -66,17 +69,63 @@ public class JobResult { @SerializedName(SERIALIZED_NAME_TYPE) private String type; - public static final String SERIALIZED_NAME_DRY_RUN = "dryRun"; - @SerializedName(SERIALIZED_NAME_DRY_RUN) - private Boolean dryRun; + /** + * Current status of the job (e.g., Success, Failed, InProgress) + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + IN_PROGRESS("InProgress"), + + SUCCESS("Success"), + + FAILED("Failed"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } - public static final String SERIALIZED_NAME_UPSERT = "upsert"; - @SerializedName(SERIALIZED_NAME_UPSERT) - private Boolean upsert; + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) - private String status; + private StatusEnum status; public static final String SERIALIZED_NAME_ERROR_MESSAGE = "errorMessage"; @SerializedName(SERIALIZED_NAME_ERROR_MESSAGE) @@ -130,16 +179,32 @@ public class JobResult { @SerializedName(SERIALIZED_NAME_CREATED_VALID) private Integer createdValid; - public JobResult() { + public static final String SERIALIZED_NAME_DRY_RUN = "dryRun"; + @SerializedName(SERIALIZED_NAME_DRY_RUN) + private Boolean dryRun; + + public static final String SERIALIZED_NAME_UPSERT = "upsert"; + @SerializedName(SERIALIZED_NAME_UPSERT) + private Boolean upsert; + + public static final String SERIALIZED_NAME_LINK = "link"; + @SerializedName(SERIALIZED_NAME_LINK) + private String link; + + public static final String SERIALIZED_NAME_PROCESSED_FORMS = "processedForms"; + @SerializedName(SERIALIZED_NAME_PROCESSED_FORMS) + private List processedForms; + + public JobResponse() { } - public JobResult id(String id) { + public JobResponse id(String id) { this.id = id; return this; } /** - * Get id + * Unique identifier for the job * @return id */ @javax.annotation.Nullable @@ -152,13 +217,13 @@ public void setId(String id) { } - public JobResult type(String type) { + public JobResponse type(String type) { this.type = type; return this; } /** - * Get type + * Job type identifier. Will always be \"update_job\" for bulk upsert operations * @return type */ @javax.annotation.Nullable @@ -171,70 +236,32 @@ public void setType(String type) { } - public JobResult dryRun(Boolean dryRun) { - this.dryRun = dryRun; - return this; - } - - /** - * Dry run. If `true`, this job only simulates the changes but doesn't actually persist them. - * @return dryRun - */ - @javax.annotation.Nullable - public Boolean getDryRun() { - return dryRun; - } - - public void setDryRun(Boolean dryRun) { - this.dryRun = dryRun; - } - - - public JobResult upsert(Boolean upsert) { - this.upsert = upsert; - return this; - } - - /** - * Upsert. If `true`, this job will first attempt to update existing records if matches can be found. Matches are done in the following order: * Form ID * Form Reference ID and tax year * Form TIN and tax year - * @return upsert - */ - @javax.annotation.Nullable - public Boolean getUpsert() { - return upsert; - } - - public void setUpsert(Boolean upsert) { - this.upsert = upsert; - } - - - public JobResult status(String status) { + public JobResponse status(StatusEnum status) { this.status = status; return this; } /** - * Status of the job + * Current status of the job (e.g., Success, Failed, InProgress) * @return status */ @javax.annotation.Nullable - public String getStatus() { + public StatusEnum getStatus() { return status; } - public void setStatus(String status) { + public void setStatus(StatusEnum status) { this.status = status; } - public JobResult errorMessage(String errorMessage) { + public JobResponse errorMessage(String errorMessage) { this.errorMessage = errorMessage; return this; } /** - * Get errorMessage + * Error message if the job failed, null otherwise * @return errorMessage */ @javax.annotation.Nullable @@ -247,13 +274,13 @@ public void setErrorMessage(String errorMessage) { } - public JobResult totalProcessed(Integer totalProcessed) { + public JobResponse totalProcessed(Integer totalProcessed) { this.totalProcessed = totalProcessed; return this; } /** - * Total number of forms processed + * Total number of forms processed. Value can be 0 or another value based on what the job has available * @return totalProcessed */ @javax.annotation.Nullable @@ -266,13 +293,13 @@ public void setTotalProcessed(Integer totalProcessed) { } - public JobResult totalRows(Integer totalRows) { + public JobResponse totalRows(Integer totalRows) { this.totalRows = totalRows; return this; } /** - * Total number of forms in the request + * Total number of forms in the request. Value can be 0 or another value based on what the job has available * @return totalRows */ @javax.annotation.Nullable @@ -285,13 +312,13 @@ public void setTotalRows(Integer totalRows) { } - public JobResult updatedValid(Integer updatedValid) { + public JobResponse updatedValid(Integer updatedValid) { this.updatedValid = updatedValid; return this; } /** - * Number of forms updated and valid for e-filing and e-delivery + * Number of forms updated and valid for e-filing and e-delivery. Value can be 0 or another value based on what the job has available * @return updatedValid */ @javax.annotation.Nullable @@ -304,13 +331,13 @@ public void setUpdatedValid(Integer updatedValid) { } - public JobResult updatedNoEmail(Integer updatedNoEmail) { + public JobResponse updatedNoEmail(Integer updatedNoEmail) { this.updatedNoEmail = updatedNoEmail; return this; } /** - * Number of forms updated and valid for e-filing but missing email or email is undeliverable + * Number of forms updated and valid for e-filing but missing email or email is undeliverable. Value can be 0 or another value based on what the job has available * @return updatedNoEmail */ @javax.annotation.Nullable @@ -323,13 +350,13 @@ public void setUpdatedNoEmail(Integer updatedNoEmail) { } - public JobResult updatedInvalid(Integer updatedInvalid) { + public JobResponse updatedInvalid(Integer updatedInvalid) { this.updatedInvalid = updatedInvalid; return this; } /** - * Number of forms updated but invalid for e-filing + * Number of forms updated but invalid for e-filing. Value can be 0 or another value based on what the job has available * @return updatedInvalid */ @javax.annotation.Nullable @@ -342,13 +369,13 @@ public void setUpdatedInvalid(Integer updatedInvalid) { } - public JobResult skippedDuplicate(Integer skippedDuplicate) { + public JobResponse skippedDuplicate(Integer skippedDuplicate) { this.skippedDuplicate = skippedDuplicate; return this; } /** - * Number of forms skipped because they would have updated a record already updated once in the request + * Number of forms skipped because they would have updated a record already updated once in the request. Value can be 0 or another value based on what the job has available * @return skippedDuplicate */ @javax.annotation.Nullable @@ -361,13 +388,13 @@ public void setSkippedDuplicate(Integer skippedDuplicate) { } - public JobResult skippedInvalid(Integer skippedInvalid) { + public JobResponse skippedInvalid(Integer skippedInvalid) { this.skippedInvalid = skippedInvalid; return this; } /** - * Number of forms skipped because they would have made a form invalid and the form is already e-filed or scheduled for e-filing + * Number of forms skipped because they would have made a form invalid and the form is already e-filed or scheduled for e-filing. Value can be 0 or another value based on what the job has available * @return skippedInvalid */ @javax.annotation.Nullable @@ -380,13 +407,13 @@ public void setSkippedInvalid(Integer skippedInvalid) { } - public JobResult skippedMultipleMatches(Integer skippedMultipleMatches) { + public JobResponse skippedMultipleMatches(Integer skippedMultipleMatches) { this.skippedMultipleMatches = skippedMultipleMatches; return this; } /** - * Number of forms skipped because they matched multiple forms + * Number of forms skipped because they matched multiple forms. Value can be 0 or another value based on what the job has available * @return skippedMultipleMatches */ @javax.annotation.Nullable @@ -399,13 +426,13 @@ public void setSkippedMultipleMatches(Integer skippedMultipleMatches) { } - public JobResult notFound(Integer notFound) { + public JobResponse notFound(Integer notFound) { this.notFound = notFound; return this; } /** - * Number of forms skipped because no matching form or issuer could be found + * Number of forms skipped because no matching form or issuer could be found. Value can be 0 or another value based on what the job has available * @return notFound */ @javax.annotation.Nullable @@ -418,13 +445,13 @@ public void setNotFound(Integer notFound) { } - public JobResult createdInvalid(Integer createdInvalid) { + public JobResponse createdInvalid(Integer createdInvalid) { this.createdInvalid = createdInvalid; return this; } /** - * Number of new forms created because no matching form could be found (and `upsert` was true) - with errors + * Number of new forms created because no matching form could be found (and `upsert` was true) - with errors. Value can be 0 or another value based on what the job has available * @return createdInvalid */ @javax.annotation.Nullable @@ -437,13 +464,13 @@ public void setCreatedInvalid(Integer createdInvalid) { } - public JobResult createdNoEmail(Integer createdNoEmail) { + public JobResponse createdNoEmail(Integer createdNoEmail) { this.createdNoEmail = createdNoEmail; return this; } /** - * Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing but missing email or email is undeliverable + * Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing but missing email or email is undeliverable. Value can be 0 or another value based on what the job has available * @return createdNoEmail */ @javax.annotation.Nullable @@ -456,13 +483,13 @@ public void setCreatedNoEmail(Integer createdNoEmail) { } - public JobResult createdValid(Integer createdValid) { + public JobResponse createdValid(Integer createdValid) { this.createdValid = createdValid; return this; } /** - * Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing and e-delivery + * Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing and e-delivery. Value can be 0 or another value based on what the job has available * @return createdValid */ @javax.annotation.Nullable @@ -475,6 +502,90 @@ public void setCreatedValid(Integer createdValid) { } + public JobResponse dryRun(Boolean dryRun) { + this.dryRun = dryRun; + return this; + } + + /** + * Dry run. If `true`, this job only simulates the changes but doesn't actually persist them. + * @return dryRun + */ + @javax.annotation.Nullable + public Boolean getDryRun() { + return dryRun; + } + + public void setDryRun(Boolean dryRun) { + this.dryRun = dryRun; + } + + + public JobResponse upsert(Boolean upsert) { + this.upsert = upsert; + return this; + } + + /** + * Upsert. If `true`, this job will first attempt to update existing records if matches can be found. Matches are done in the following order: Form ID, Form Reference ID and tax year, Form TIN and tax year. + * @return upsert + */ + @javax.annotation.Nullable + public Boolean getUpsert() { + return upsert; + } + + public void setUpsert(Boolean upsert) { + this.upsert = upsert; + } + + + public JobResponse link(String link) { + this.link = link; + return this; + } + + /** + * Link to access the job details + * @return link + */ + @javax.annotation.Nullable + public String getLink() { + return link; + } + + public void setLink(String link) { + this.link = link; + } + + + public JobResponse processedForms(List processedForms) { + this.processedForms = processedForms; + return this; + } + + public JobResponse addProcessedFormsItem(Get1099Form200Response processedFormsItem) { + if (this.processedForms == null) { + this.processedForms = new ArrayList<>(); + } + this.processedForms.add(processedFormsItem); + return this; + } + + /** + * List of processed forms returned when bulk-upsert processes ≤1000 records. Same format as GET /1099/forms response. Only available in bulk-upsert endpoint responses. + * @return processedForms + */ + @javax.annotation.Nullable + public List getProcessedForms() { + return processedForms; + } + + public void setProcessedForms(List processedForms) { + this.processedForms = processedForms; + } + + @Override public boolean equals(Object o) { @@ -484,25 +595,27 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - JobResult jobResult = (JobResult) o; - return Objects.equals(this.id, jobResult.id) && - Objects.equals(this.type, jobResult.type) && - Objects.equals(this.dryRun, jobResult.dryRun) && - Objects.equals(this.upsert, jobResult.upsert) && - Objects.equals(this.status, jobResult.status) && - Objects.equals(this.errorMessage, jobResult.errorMessage) && - Objects.equals(this.totalProcessed, jobResult.totalProcessed) && - Objects.equals(this.totalRows, jobResult.totalRows) && - Objects.equals(this.updatedValid, jobResult.updatedValid) && - Objects.equals(this.updatedNoEmail, jobResult.updatedNoEmail) && - Objects.equals(this.updatedInvalid, jobResult.updatedInvalid) && - Objects.equals(this.skippedDuplicate, jobResult.skippedDuplicate) && - Objects.equals(this.skippedInvalid, jobResult.skippedInvalid) && - Objects.equals(this.skippedMultipleMatches, jobResult.skippedMultipleMatches) && - Objects.equals(this.notFound, jobResult.notFound) && - Objects.equals(this.createdInvalid, jobResult.createdInvalid) && - Objects.equals(this.createdNoEmail, jobResult.createdNoEmail) && - Objects.equals(this.createdValid, jobResult.createdValid); + JobResponse jobResponse = (JobResponse) o; + return Objects.equals(this.id, jobResponse.id) && + Objects.equals(this.type, jobResponse.type) && + Objects.equals(this.status, jobResponse.status) && + Objects.equals(this.errorMessage, jobResponse.errorMessage) && + Objects.equals(this.totalProcessed, jobResponse.totalProcessed) && + Objects.equals(this.totalRows, jobResponse.totalRows) && + Objects.equals(this.updatedValid, jobResponse.updatedValid) && + Objects.equals(this.updatedNoEmail, jobResponse.updatedNoEmail) && + Objects.equals(this.updatedInvalid, jobResponse.updatedInvalid) && + Objects.equals(this.skippedDuplicate, jobResponse.skippedDuplicate) && + Objects.equals(this.skippedInvalid, jobResponse.skippedInvalid) && + Objects.equals(this.skippedMultipleMatches, jobResponse.skippedMultipleMatches) && + Objects.equals(this.notFound, jobResponse.notFound) && + Objects.equals(this.createdInvalid, jobResponse.createdInvalid) && + Objects.equals(this.createdNoEmail, jobResponse.createdNoEmail) && + Objects.equals(this.createdValid, jobResponse.createdValid) && + Objects.equals(this.dryRun, jobResponse.dryRun) && + Objects.equals(this.upsert, jobResponse.upsert) && + Objects.equals(this.link, jobResponse.link) && + Objects.equals(this.processedForms, jobResponse.processedForms); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -511,7 +624,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, type, dryRun, upsert, status, errorMessage, totalProcessed, totalRows, updatedValid, updatedNoEmail, updatedInvalid, skippedDuplicate, skippedInvalid, skippedMultipleMatches, notFound, createdInvalid, createdNoEmail, createdValid); + return Objects.hash(id, type, status, errorMessage, totalProcessed, totalRows, updatedValid, updatedNoEmail, updatedInvalid, skippedDuplicate, skippedInvalid, skippedMultipleMatches, notFound, createdInvalid, createdNoEmail, createdValid, dryRun, upsert, link, processedForms); } private static int hashCodeNullable(JsonNullable a) { @@ -524,11 +637,9 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class JobResult {\n"); + sb.append("class JobResponse {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); - sb.append(" upsert: ").append(toIndentedString(upsert)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); sb.append(" totalProcessed: ").append(toIndentedString(totalProcessed)).append("\n"); @@ -543,6 +654,10 @@ public String toString() { sb.append(" createdInvalid: ").append(toIndentedString(createdInvalid)).append("\n"); sb.append(" createdNoEmail: ").append(toIndentedString(createdNoEmail)).append("\n"); sb.append(" createdValid: ").append(toIndentedString(createdValid)).append("\n"); + sb.append(" dryRun: ").append(toIndentedString(dryRun)).append("\n"); + sb.append(" upsert: ").append(toIndentedString(upsert)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" processedForms: ").append(toIndentedString(processedForms)).append("\n"); sb.append("}"); return sb.toString(); } @@ -567,8 +682,6 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("id"); openapiFields.add("type"); - openapiFields.add("dryRun"); - openapiFields.add("upsert"); openapiFields.add("status"); openapiFields.add("errorMessage"); openapiFields.add("totalProcessed"); @@ -583,6 +696,10 @@ private String toIndentedString(Object o) { openapiFields.add("createdInvalid"); openapiFields.add("createdNoEmail"); openapiFields.add("createdValid"); + openapiFields.add("dryRun"); + openapiFields.add("upsert"); + openapiFields.add("link"); + openapiFields.add("processedForms"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -592,20 +709,20 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to JobResult + * @throws IOException if the JSON Element is invalid with respect to JobResponse */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!JobResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in JobResult is not found in the empty JSON string", JobResult.openapiRequiredFields.toString())); + if (!JobResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in JobResponse is not found in the empty JSON string", JobResponse.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!JobResult.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JobResult` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!JobResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JobResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -618,31 +735,52 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } + if ((jsonObj.get("link") != null && !jsonObj.get("link").isJsonNull()) && !jsonObj.get("link").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `link` to be a primitive type in the JSON string but got `%s`", jsonObj.get("link").toString())); + } + if (jsonObj.get("processedForms") != null && !jsonObj.get("processedForms").isJsonNull()) { + JsonArray jsonArrayprocessedForms = jsonObj.getAsJsonArray("processedForms"); + if (jsonArrayprocessedForms != null) { + // ensure the json data is an array + if (!jsonObj.get("processedForms").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `processedForms` to be an array in the JSON string but got `%s`", jsonObj.get("processedForms").toString())); + } + + // validate the optional field `processedForms` (array) + for (int i = 0; i < jsonArrayprocessedForms.size(); i++) { + Get1099Form200Response.validateJsonElement(jsonArrayprocessedForms.get(i)); + }; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!JobResult.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'JobResult' and its subtypes + if (!JobResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JobResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(JobResult.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JobResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, JobResult value) throws IOException { + public void write(JsonWriter out, JobResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public JobResult read(JsonReader in) throws IOException { + public JobResponse read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -653,18 +791,18 @@ public JobResult read(JsonReader in) throws IOException { } /** - * Create an instance of JobResult given an JSON string + * Create an instance of JobResponse given an JSON string * * @param jsonString JSON string - * @return An instance of JobResult - * @throws IOException if the JSON string is invalid with respect to JobResult + * @return An instance of JobResponse + * @throws IOException if the JSON string is invalid with respect to JobResponse */ - public static JobResult fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, JobResult.class); + public static JobResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JobResponse.class); } /** - * Convert an instance of JobResult to an JSON string + * Convert an instance of JobResponse to an JSON string * * @return JSON string */ diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Link.java b/src/main/java/Avalara/SDK/model/A1099/V2/Link.java deleted file mode 100644 index 18116ff..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Link.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Link - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Link { - public static final String SERIALIZED_NAME_SELF = "self"; - @SerializedName(SERIALIZED_NAME_SELF) - private String self; - - public Link() { - } - - public Link self(String self) { - this.self = self; - return this; - } - - /** - * Get self - * @return self - */ - @javax.annotation.Nullable - public String getSelf() { - return self; - } - - public void setSelf(String self) { - this.self = self; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Link link = (Link) o; - return Objects.equals(this.self, link.self); - } - - @Override - public int hashCode() { - return Objects.hash(self); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Link {\n"); - sb.append(" self: ").append(toIndentedString(self)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("self"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Link - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Link.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Link is not found in the empty JSON string", Link.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Link.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Link` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("self") != null && !jsonObj.get("self").isJsonNull()) && !jsonObj.get("self").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `self` to be a primitive type in the JSON string but got `%s`", jsonObj.get("self").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Link.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Link' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Link.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Link value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Link read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Link given an JSON string - * - * @param jsonString JSON string - * @return An instance of Link - * @throws IOException if the JSON string is invalid with respect to Link - */ - public static Link fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Link.class); - } - - /** - * Convert an instance of Link to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverage.java b/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverage.java new file mode 100644 index 0000000..63527d9 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverage.java @@ -0,0 +1,600 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * Offer and coverage information for health coverage forms + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class OfferAndCoverage { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + /** + * Month of coverage. Available values: - All: All months - January: January - February: February - March: March - April: April - May: May - June: June - July: July - August: August - September: September - October: October - November: November - December: December + */ + @JsonAdapter(MonthEnum.Adapter.class) + public enum MonthEnum { + ALL("All"), + + _01("01"), + + _02("02"), + + _03("03"), + + _04("04"), + + _05("05"), + + _06("06"), + + _07("07"), + + _08("08"), + + _09("09"), + + _10("10"), + + _11("11"), + + _12("12"); + + private String value; + + MonthEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MonthEnum fromValue(String value) { + for (MonthEnum b : MonthEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MonthEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MonthEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MonthEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + MonthEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_MONTH = "month"; + @SerializedName(SERIALIZED_NAME_MONTH) + private MonthEnum month; + + /** + * Offer of Coverage Code. Required if Share has a value, including zero. Available values: Pre-ICHRA Codes (available before 2020): - 1A: Qualifying offer: minimum essential coverage providing minimum value offered to full-time employee with employee required contribution ≤ 9.5% (as adjusted) of mainland single federal poverty line and at least minimum essential coverage offered to spouse and dependent(s) - 1B: Minimum essential coverage providing minimum value offered to employee only - 1C: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to dependent(s) (not spouse) - 1D: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to spouse (not dependent(s)) - 1E: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to dependent(s) and spouse - 1F: Minimum essential coverage NOT providing minimum value offered to employee; employee and spouse or dependent(s); or employee, spouse, and dependents - 1G: Offer of coverage to an individual who was not an employee or not a full-time employee and who enrolled in self-insured coverage - 1H: No offer of coverage (employee not offered any health coverage or employee offered coverage that is not minimum essential coverage) - 1J: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage conditionally offered to spouse; minimum essential coverage not offered to dependent(s) - 1K: Minimum essential coverage providing minimum value offered to employee; at least minimum essential coverage offered to dependents; and at least minimum essential coverage conditionally offered to spouse ICHRA Codes (introduced 2020, require ZIP code): - 1L: Individual coverage HRA offered to employee only - 1M: Individual coverage HRA offered to employee and dependent(s) (not spouse) - 1N: Individual coverage HRA offered to employee, spouse, and dependent(s) - 1O: Individual coverage HRA offered to employee only using employment site ZIP code affordability safe harbor - 1P: Individual coverage HRA offered to employee and dependent(s) (not spouse) using employment site ZIP code affordability safe harbor - 1Q: Individual coverage HRA offered to employee, spouse, and dependent(s) using employment site ZIP code affordability safe harbor - 1R: Individual coverage HRA that is NOT affordable - 1S: Individual coverage HRA offered to an individual who was not a full-time employee - 1T: Individual coverage HRA offered to employee and spouse (not dependents) - 1U: Individual coverage HRA offered to employee and spouse (not dependents) using employment site ZIP code affordability safe harbor Note: Codes 1B, 1C, 1D, 1E, 1J, 1K, 1L, 1M, 1N, 1O, 1P, 1Q, 1T, 1U require employee share amount (0.00 is a valid value). + */ + @JsonAdapter(OfferCodeEnum.Adapter.class) + public enum OfferCodeEnum { + _1_A("1A"), + + _1_B("1B"), + + _1_C("1C"), + + _1_D("1D"), + + _1_E("1E"), + + _1_F("1F"), + + _1_G("1G"), + + _1_H("1H"), + + _1_J("1J"), + + _1_K("1K"), + + _1_L("1L"), + + _1_M("1M"), + + _1_N("1N"), + + _1_O("1O"), + + _1_P("1P"), + + _1_Q("1Q"), + + _1_R("1R"), + + _1_S("1S"), + + _1_T("1T"), + + _1_U("1U"); + + private String value; + + OfferCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OfferCodeEnum fromValue(String value) { + for (OfferCodeEnum b : OfferCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OfferCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OfferCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OfferCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OfferCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_OFFER_CODE = "offerCode"; + @SerializedName(SERIALIZED_NAME_OFFER_CODE) + private OfferCodeEnum offerCode; + + public static final String SERIALIZED_NAME_SHARE = "share"; + @SerializedName(SERIALIZED_NAME_SHARE) + private Double share; + + /** + * Safe harbor code - Applicable Section 4980H Safe Harbor Code. Available values: - 2A: Form W-2 safe harbor - 2B: Federal poverty line safe harbor - 2C: Rate of pay safe harbor - 2D: Part-time employee safe harbor for employees who were not full-time for any month of the year - 2E: Multiemployer interim rule relief - 2F: Qualifying offer method - 2G: Qualifying offer transition relief - 2H: Other affordability safe harbor + */ + @JsonAdapter(SafeHarborCodeEnum.Adapter.class) + public enum SafeHarborCodeEnum { + _2_A("2A"), + + _2_B("2B"), + + _2_C("2C"), + + _2_D("2D"), + + _2_E("2E"), + + _2_F("2F"), + + _2_G("2G"), + + _2_H("2H"); + + private String value; + + SafeHarborCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SafeHarborCodeEnum fromValue(String value) { + for (SafeHarborCodeEnum b : SafeHarborCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SafeHarborCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SafeHarborCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SafeHarborCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SafeHarborCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SAFE_HARBOR_CODE = "safeHarborCode"; + @SerializedName(SERIALIZED_NAME_SAFE_HARBOR_CODE) + private SafeHarborCodeEnum safeHarborCode; + + public static final String SERIALIZED_NAME_ZIP_CODE = "zipCode"; + @SerializedName(SERIALIZED_NAME_ZIP_CODE) + private String zipCode; + + public OfferAndCoverage() { + } + + public OfferAndCoverage( + Integer id + ) { + this(); + this.id = id; + } + + /** + * Id + * @return id + */ + @javax.annotation.Nullable + public Integer getId() { + return id; + } + + + + public OfferAndCoverage month(MonthEnum month) { + this.month = month; + return this; + } + + /** + * Month of coverage. Available values: - All: All months - January: January - February: February - March: March - April: April - May: May - June: June - July: July - August: August - September: September - October: October - November: November - December: December + * @return month + */ + @javax.annotation.Nullable + public MonthEnum getMonth() { + return month; + } + + public void setMonth(MonthEnum month) { + this.month = month; + } + + + public OfferAndCoverage offerCode(OfferCodeEnum offerCode) { + this.offerCode = offerCode; + return this; + } + + /** + * Offer of Coverage Code. Required if Share has a value, including zero. Available values: Pre-ICHRA Codes (available before 2020): - 1A: Qualifying offer: minimum essential coverage providing minimum value offered to full-time employee with employee required contribution ≤ 9.5% (as adjusted) of mainland single federal poverty line and at least minimum essential coverage offered to spouse and dependent(s) - 1B: Minimum essential coverage providing minimum value offered to employee only - 1C: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to dependent(s) (not spouse) - 1D: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to spouse (not dependent(s)) - 1E: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage offered to dependent(s) and spouse - 1F: Minimum essential coverage NOT providing minimum value offered to employee; employee and spouse or dependent(s); or employee, spouse, and dependents - 1G: Offer of coverage to an individual who was not an employee or not a full-time employee and who enrolled in self-insured coverage - 1H: No offer of coverage (employee not offered any health coverage or employee offered coverage that is not minimum essential coverage) - 1J: Minimum essential coverage providing minimum value offered to employee and at least minimum essential coverage conditionally offered to spouse; minimum essential coverage not offered to dependent(s) - 1K: Minimum essential coverage providing minimum value offered to employee; at least minimum essential coverage offered to dependents; and at least minimum essential coverage conditionally offered to spouse ICHRA Codes (introduced 2020, require ZIP code): - 1L: Individual coverage HRA offered to employee only - 1M: Individual coverage HRA offered to employee and dependent(s) (not spouse) - 1N: Individual coverage HRA offered to employee, spouse, and dependent(s) - 1O: Individual coverage HRA offered to employee only using employment site ZIP code affordability safe harbor - 1P: Individual coverage HRA offered to employee and dependent(s) (not spouse) using employment site ZIP code affordability safe harbor - 1Q: Individual coverage HRA offered to employee, spouse, and dependent(s) using employment site ZIP code affordability safe harbor - 1R: Individual coverage HRA that is NOT affordable - 1S: Individual coverage HRA offered to an individual who was not a full-time employee - 1T: Individual coverage HRA offered to employee and spouse (not dependents) - 1U: Individual coverage HRA offered to employee and spouse (not dependents) using employment site ZIP code affordability safe harbor Note: Codes 1B, 1C, 1D, 1E, 1J, 1K, 1L, 1M, 1N, 1O, 1P, 1Q, 1T, 1U require employee share amount (0.00 is a valid value). + * @return offerCode + */ + @javax.annotation.Nullable + public OfferCodeEnum getOfferCode() { + return offerCode; + } + + public void setOfferCode(OfferCodeEnum offerCode) { + this.offerCode = offerCode; + } + + + public OfferAndCoverage share(Double share) { + this.share = share; + return this; + } + + /** + * Employee required contribution share - Employee Share of Lowest Cost Monthly Premium, for Self-Only Minimum Value Coverage - May not exceed 3499.99 + * @return share + */ + @javax.annotation.Nullable + public Double getShare() { + return share; + } + + public void setShare(Double share) { + this.share = share; + } + + + public OfferAndCoverage safeHarborCode(SafeHarborCodeEnum safeHarborCode) { + this.safeHarborCode = safeHarborCode; + return this; + } + + /** + * Safe harbor code - Applicable Section 4980H Safe Harbor Code. Available values: - 2A: Form W-2 safe harbor - 2B: Federal poverty line safe harbor - 2C: Rate of pay safe harbor - 2D: Part-time employee safe harbor for employees who were not full-time for any month of the year - 2E: Multiemployer interim rule relief - 2F: Qualifying offer method - 2G: Qualifying offer transition relief - 2H: Other affordability safe harbor + * @return safeHarborCode + */ + @javax.annotation.Nullable + public SafeHarborCodeEnum getSafeHarborCode() { + return safeHarborCode; + } + + public void setSafeHarborCode(SafeHarborCodeEnum safeHarborCode) { + this.safeHarborCode = safeHarborCode; + } + + + public OfferAndCoverage zipCode(String zipCode) { + this.zipCode = zipCode; + return this; + } + + /** + * ZIP/postal code. For coverage area (optional, unless codes 1L to 1U are used). + * @return zipCode + */ + @javax.annotation.Nullable + public String getZipCode() { + return zipCode; + } + + public void setZipCode(String zipCode) { + this.zipCode = zipCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OfferAndCoverage offerAndCoverage = (OfferAndCoverage) o; + return Objects.equals(this.id, offerAndCoverage.id) && + Objects.equals(this.month, offerAndCoverage.month) && + Objects.equals(this.offerCode, offerAndCoverage.offerCode) && + Objects.equals(this.share, offerAndCoverage.share) && + Objects.equals(this.safeHarborCode, offerAndCoverage.safeHarborCode) && + Objects.equals(this.zipCode, offerAndCoverage.zipCode); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, month, offerCode, share, safeHarborCode, zipCode); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OfferAndCoverage {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" month: ").append(toIndentedString(month)).append("\n"); + sb.append(" offerCode: ").append(toIndentedString(offerCode)).append("\n"); + sb.append(" share: ").append(toIndentedString(share)).append("\n"); + sb.append(" safeHarborCode: ").append(toIndentedString(safeHarborCode)).append("\n"); + sb.append(" zipCode: ").append(toIndentedString(zipCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("month"); + openapiFields.add("offerCode"); + openapiFields.add("share"); + openapiFields.add("safeHarborCode"); + openapiFields.add("zipCode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OfferAndCoverage + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OfferAndCoverage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OfferAndCoverage is not found in the empty JSON string", OfferAndCoverage.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OfferAndCoverage.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OfferAndCoverage` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("month") != null && !jsonObj.get("month").isJsonNull()) && !jsonObj.get("month").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `month` to be a primitive type in the JSON string but got `%s`", jsonObj.get("month").toString())); + } + // validate the optional field `month` + if (jsonObj.get("month") != null && !jsonObj.get("month").isJsonNull()) { + MonthEnum.validateJsonElement(jsonObj.get("month")); + } + if ((jsonObj.get("offerCode") != null && !jsonObj.get("offerCode").isJsonNull()) && !jsonObj.get("offerCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `offerCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("offerCode").toString())); + } + // validate the optional field `offerCode` + if (jsonObj.get("offerCode") != null && !jsonObj.get("offerCode").isJsonNull()) { + OfferCodeEnum.validateJsonElement(jsonObj.get("offerCode")); + } + if ((jsonObj.get("safeHarborCode") != null && !jsonObj.get("safeHarborCode").isJsonNull()) && !jsonObj.get("safeHarborCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `safeHarborCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("safeHarborCode").toString())); + } + // validate the optional field `safeHarborCode` + if (jsonObj.get("safeHarborCode") != null && !jsonObj.get("safeHarborCode").isJsonNull()) { + SafeHarborCodeEnum.validateJsonElement(jsonObj.get("safeHarborCode")); + } + if ((jsonObj.get("zipCode") != null && !jsonObj.get("zipCode").isJsonNull()) && !jsonObj.get("zipCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zipCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zipCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OfferAndCoverage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OfferAndCoverage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OfferAndCoverage.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OfferAndCoverage value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OfferAndCoverage read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OfferAndCoverage given an JSON string + * + * @param jsonString JSON string + * @return An instance of OfferAndCoverage + * @throws IOException if the JSON string is invalid with respect to OfferAndCoverage + */ + public static OfferAndCoverage fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OfferAndCoverage.class); + } + + /** + * Convert an instance of OfferAndCoverage to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverageRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverageRequest.java deleted file mode 100644 index 77c3763..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverageRequest.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * OfferAndCoverageRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class OfferAndCoverageRequest { - public static final String SERIALIZED_NAME_MONTH = "month"; - @SerializedName(SERIALIZED_NAME_MONTH) - private String month; - - public static final String SERIALIZED_NAME_OFFER_CODE = "offerCode"; - @SerializedName(SERIALIZED_NAME_OFFER_CODE) - private String offerCode; - - public static final String SERIALIZED_NAME_SHARE = "share"; - @SerializedName(SERIALIZED_NAME_SHARE) - private Double share; - - public static final String SERIALIZED_NAME_SAFE_HARBOR_CODE = "safeHarborCode"; - @SerializedName(SERIALIZED_NAME_SAFE_HARBOR_CODE) - private String safeHarborCode; - - public static final String SERIALIZED_NAME_ZIP_CODE = "zipCode"; - @SerializedName(SERIALIZED_NAME_ZIP_CODE) - private String zipCode; - - public OfferAndCoverageRequest() { - } - - public OfferAndCoverageRequest month(String month) { - this.month = month; - return this; - } - - /** - * Month of coverage - * @return month - */ - @javax.annotation.Nullable - public String getMonth() { - return month; - } - - public void setMonth(String month) { - this.month = month; - } - - - public OfferAndCoverageRequest offerCode(String offerCode) { - this.offerCode = offerCode; - return this; - } - - /** - * Offer of coverage code - * @return offerCode - */ - @javax.annotation.Nullable - public String getOfferCode() { - return offerCode; - } - - public void setOfferCode(String offerCode) { - this.offerCode = offerCode; - } - - - public OfferAndCoverageRequest share(Double share) { - this.share = share; - return this; - } - - /** - * Employee required contribution share - * @return share - */ - @javax.annotation.Nullable - public Double getShare() { - return share; - } - - public void setShare(Double share) { - this.share = share; - } - - - public OfferAndCoverageRequest safeHarborCode(String safeHarborCode) { - this.safeHarborCode = safeHarborCode; - return this; - } - - /** - * Safe harbor code - * @return safeHarborCode - */ - @javax.annotation.Nullable - public String getSafeHarborCode() { - return safeHarborCode; - } - - public void setSafeHarborCode(String safeHarborCode) { - this.safeHarborCode = safeHarborCode; - } - - - public OfferAndCoverageRequest zipCode(String zipCode) { - this.zipCode = zipCode; - return this; - } - - /** - * ZIP code for coverage area - * @return zipCode - */ - @javax.annotation.Nullable - public String getZipCode() { - return zipCode; - } - - public void setZipCode(String zipCode) { - this.zipCode = zipCode; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OfferAndCoverageRequest offerAndCoverageRequest = (OfferAndCoverageRequest) o; - return Objects.equals(this.month, offerAndCoverageRequest.month) && - Objects.equals(this.offerCode, offerAndCoverageRequest.offerCode) && - Objects.equals(this.share, offerAndCoverageRequest.share) && - Objects.equals(this.safeHarborCode, offerAndCoverageRequest.safeHarborCode) && - Objects.equals(this.zipCode, offerAndCoverageRequest.zipCode); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(month, offerCode, share, safeHarborCode, zipCode); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OfferAndCoverageRequest {\n"); - sb.append(" month: ").append(toIndentedString(month)).append("\n"); - sb.append(" offerCode: ").append(toIndentedString(offerCode)).append("\n"); - sb.append(" share: ").append(toIndentedString(share)).append("\n"); - sb.append(" safeHarborCode: ").append(toIndentedString(safeHarborCode)).append("\n"); - sb.append(" zipCode: ").append(toIndentedString(zipCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("month"); - openapiFields.add("offerCode"); - openapiFields.add("share"); - openapiFields.add("safeHarborCode"); - openapiFields.add("zipCode"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OfferAndCoverageRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OfferAndCoverageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OfferAndCoverageRequest is not found in the empty JSON string", OfferAndCoverageRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OfferAndCoverageRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OfferAndCoverageRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("month") != null && !jsonObj.get("month").isJsonNull()) && !jsonObj.get("month").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `month` to be a primitive type in the JSON string but got `%s`", jsonObj.get("month").toString())); - } - if ((jsonObj.get("offerCode") != null && !jsonObj.get("offerCode").isJsonNull()) && !jsonObj.get("offerCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `offerCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("offerCode").toString())); - } - if ((jsonObj.get("safeHarborCode") != null && !jsonObj.get("safeHarborCode").isJsonNull()) && !jsonObj.get("safeHarborCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `safeHarborCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("safeHarborCode").toString())); - } - if ((jsonObj.get("zipCode") != null && !jsonObj.get("zipCode").isJsonNull()) && !jsonObj.get("zipCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zipCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zipCode").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OfferAndCoverageRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OfferAndCoverageRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OfferAndCoverageRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OfferAndCoverageRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OfferAndCoverageRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OfferAndCoverageRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of OfferAndCoverageRequest - * @throws IOException if the JSON string is invalid with respect to OfferAndCoverageRequest - */ - public static OfferAndCoverageRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OfferAndCoverageRequest.class); - } - - /** - * Convert an instance of OfferAndCoverageRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelForm1099Base.java similarity index 72% rename from src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModel.java rename to src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelForm1099Base.java index f420be2..14a6f54 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelForm1099Base.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.Get1099Form200Response; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -59,23 +60,23 @@ * Generic paginated model to wrap query response data */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class PaginatedQueryResultModel { +public class PaginatedQueryResultModelForm1099Base { public static final String SERIALIZED_NAME_AT_RECORDSET_COUNT = "@recordsetCount"; @SerializedName(SERIALIZED_NAME_AT_RECORDSET_COUNT) private Integer atRecordsetCount; public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - private List value; + private List value; public static final String SERIALIZED_NAME_AT_NEXT_LINK = "@nextLink"; @SerializedName(SERIALIZED_NAME_AT_NEXT_LINK) private String atNextLink; - public PaginatedQueryResultModel() { + public PaginatedQueryResultModelForm1099Base() { } - public PaginatedQueryResultModel atRecordsetCount(Integer atRecordsetCount) { + public PaginatedQueryResultModelForm1099Base atRecordsetCount(Integer atRecordsetCount) { this.atRecordsetCount = atRecordsetCount; return this; } @@ -94,12 +95,12 @@ public void setAtRecordsetCount(Integer atRecordsetCount) { } - public PaginatedQueryResultModel value(List value) { + public PaginatedQueryResultModelForm1099Base value(List value) { this.value = value; return this; } - public PaginatedQueryResultModel addValueItem(Object valueItem) { + public PaginatedQueryResultModelForm1099Base addValueItem(Get1099Form200Response valueItem) { if (this.value == null) { this.value = new ArrayList<>(); } @@ -112,16 +113,16 @@ public PaginatedQueryResultModel addValueItem(Object valueItem) { * @return value */ @javax.annotation.Nullable - public List getValue() { + public List getValue() { return value; } - public void setValue(List value) { + public void setValue(List value) { this.value = value; } - public PaginatedQueryResultModel atNextLink(String atNextLink) { + public PaginatedQueryResultModelForm1099Base atNextLink(String atNextLink) { this.atNextLink = atNextLink; return this; } @@ -149,10 +150,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PaginatedQueryResultModel paginatedQueryResultModel = (PaginatedQueryResultModel) o; - return Objects.equals(this.atRecordsetCount, paginatedQueryResultModel.atRecordsetCount) && - Objects.equals(this.value, paginatedQueryResultModel.value) && - Objects.equals(this.atNextLink, paginatedQueryResultModel.atNextLink); + PaginatedQueryResultModelForm1099Base paginatedQueryResultModelForm1099Base = (PaginatedQueryResultModelForm1099Base) o; + return Objects.equals(this.atRecordsetCount, paginatedQueryResultModelForm1099Base.atRecordsetCount) && + Objects.equals(this.value, paginatedQueryResultModelForm1099Base.value) && + Objects.equals(this.atNextLink, paginatedQueryResultModelForm1099Base.atNextLink); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -174,7 +175,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PaginatedQueryResultModel {\n"); + sb.append("class PaginatedQueryResultModelForm1099Base {\n"); sb.append(" atRecordsetCount: ").append(toIndentedString(atRecordsetCount)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" atNextLink: ").append(toIndentedString(atNextLink)).append("\n"); @@ -200,6 +201,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("@recordsetCount"); + openapiFields.add("value"); + openapiFields.add("@nextLink"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -209,26 +213,36 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaginatedQueryResultModel + * @throws IOException if the JSON Element is invalid with respect to PaginatedQueryResultModelForm1099Base */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!PaginatedQueryResultModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaginatedQueryResultModel is not found in the empty JSON string", PaginatedQueryResultModel.openapiRequiredFields.toString())); + if (!PaginatedQueryResultModelForm1099Base.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PaginatedQueryResultModelForm1099Base is not found in the empty JSON string", PaginatedQueryResultModelForm1099Base.openapiRequiredFields.toString())); } } Set> entries = jsonElement.getAsJsonObject().entrySet(); // check to see if the JSON string contains additional fields for (Map.Entry entry : entries) { - if (!PaginatedQueryResultModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginatedQueryResultModel` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + if (!PaginatedQueryResultModelForm1099Base.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginatedQueryResultModelForm1099Base` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull() && !jsonObj.get("value").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be an array in the JSON string but got `%s`", jsonObj.get("value").toString())); + if (jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) { + JsonArray jsonArrayvalue = jsonObj.getAsJsonArray("value"); + if (jsonArrayvalue != null) { + // ensure the json data is an array + if (!jsonObj.get("value").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be an array in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + + // validate the optional field `value` (array) + for (int i = 0; i < jsonArrayvalue.size(); i++) { + Get1099Form200Response.validateJsonElement(jsonArrayvalue.get(i)); + }; + } } if ((jsonObj.get("@nextLink") != null && !jsonObj.get("@nextLink").isJsonNull()) && !jsonObj.get("@nextLink").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `@nextLink` to be a primitive type in the JSON string but got `%s`", jsonObj.get("@nextLink").toString())); @@ -239,22 +253,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaginatedQueryResultModel.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaginatedQueryResultModel' and its subtypes + if (!PaginatedQueryResultModelForm1099Base.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PaginatedQueryResultModelForm1099Base' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaginatedQueryResultModel.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PaginatedQueryResultModelForm1099Base.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PaginatedQueryResultModel value) throws IOException { + public void write(JsonWriter out, PaginatedQueryResultModelForm1099Base value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PaginatedQueryResultModel read(JsonReader in) throws IOException { + public PaginatedQueryResultModelForm1099Base read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -265,18 +279,18 @@ public PaginatedQueryResultModel read(JsonReader in) throws IOException { } /** - * Create an instance of PaginatedQueryResultModel given an JSON string + * Create an instance of PaginatedQueryResultModelForm1099Base given an JSON string * * @param jsonString JSON string - * @return An instance of PaginatedQueryResultModel - * @throws IOException if the JSON string is invalid with respect to PaginatedQueryResultModel + * @return An instance of PaginatedQueryResultModelForm1099Base + * @throws IOException if the JSON string is invalid with respect to PaginatedQueryResultModelForm1099Base */ - public static PaginatedQueryResultModel fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaginatedQueryResultModel.class); + public static PaginatedQueryResultModelForm1099Base fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PaginatedQueryResultModelForm1099Base.class); } /** - * Convert an instance of PaginatedQueryResultModel to an JSON string + * Convert an instance of PaginatedQueryResultModelForm1099Base to an JSON string * * @return JSON string */ diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedW9FormsModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedW9FormsModel.java deleted file mode 100644 index 2c64992..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedW9FormsModel.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.IW9FormDataModelsOneOf; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Paginated model for W9/W4/W8 forms query response data - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class PaginatedW9FormsModel { - public static final String SERIALIZED_NAME_AT_RECORDSET_COUNT = "@recordsetCount"; - @SerializedName(SERIALIZED_NAME_AT_RECORDSET_COUNT) - private Integer atRecordsetCount; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private List value; - - public static final String SERIALIZED_NAME_AT_NEXT_LINK = "@nextLink"; - @SerializedName(SERIALIZED_NAME_AT_NEXT_LINK) - private String atNextLink; - - public PaginatedW9FormsModel() { - } - - public PaginatedW9FormsModel atRecordsetCount(Integer atRecordsetCount) { - this.atRecordsetCount = atRecordsetCount; - return this; - } - - /** - * Get atRecordsetCount - * @return atRecordsetCount - */ - @javax.annotation.Nullable - public Integer getAtRecordsetCount() { - return atRecordsetCount; - } - - public void setAtRecordsetCount(Integer atRecordsetCount) { - this.atRecordsetCount = atRecordsetCount; - } - - - public PaginatedW9FormsModel value(List value) { - this.value = value; - return this; - } - - public PaginatedW9FormsModel addValueItem(IW9FormDataModelsOneOf valueItem) { - if (this.value == null) { - this.value = new ArrayList<>(); - } - this.value.add(valueItem); - return this; - } - - /** - * Get value - * @return value - */ - @javax.annotation.Nullable - public List getValue() { - return value; - } - - public void setValue(List value) { - this.value = value; - } - - - public PaginatedW9FormsModel atNextLink(String atNextLink) { - this.atNextLink = atNextLink; - return this; - } - - /** - * Get atNextLink - * @return atNextLink - */ - @javax.annotation.Nullable - public String getAtNextLink() { - return atNextLink; - } - - public void setAtNextLink(String atNextLink) { - this.atNextLink = atNextLink; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PaginatedW9FormsModel paginatedW9FormsModel = (PaginatedW9FormsModel) o; - return Objects.equals(this.atRecordsetCount, paginatedW9FormsModel.atRecordsetCount) && - Objects.equals(this.value, paginatedW9FormsModel.value) && - Objects.equals(this.atNextLink, paginatedW9FormsModel.atNextLink); - } - - @Override - public int hashCode() { - return Objects.hash(atRecordsetCount, value, atNextLink); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PaginatedW9FormsModel {\n"); - sb.append(" atRecordsetCount: ").append(toIndentedString(atRecordsetCount)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" atNextLink: ").append(toIndentedString(atNextLink)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PaginatedW9FormsModel - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PaginatedW9FormsModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PaginatedW9FormsModel is not found in the empty JSON string", PaginatedW9FormsModel.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PaginatedW9FormsModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginatedW9FormsModel` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) { - JsonArray jsonArrayvalue = jsonObj.getAsJsonArray("value"); - if (jsonArrayvalue != null) { - // ensure the json data is an array - if (!jsonObj.get("value").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be an array in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - - // validate the optional field `value` (array) - for (int i = 0; i < jsonArrayvalue.size(); i++) { - IW9FormDataModelsOneOf.validateJsonElement(jsonArrayvalue.get(i)); - }; - } - } - if ((jsonObj.get("@nextLink") != null && !jsonObj.get("@nextLink").isJsonNull()) && !jsonObj.get("@nextLink").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `@nextLink` to be a primitive type in the JSON string but got `%s`", jsonObj.get("@nextLink").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PaginatedW9FormsModel.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PaginatedW9FormsModel' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PaginatedW9FormsModel.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PaginatedW9FormsModel value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PaginatedW9FormsModel read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PaginatedW9FormsModel given an JSON string - * - * @param jsonString JSON string - * @return An instance of PaginatedW9FormsModel - * @throws IOException if the JSON string is invalid with respect to PaginatedW9FormsModel - */ - public static PaginatedW9FormsModel fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PaginatedW9FormsModel.class); - } - - /** - * Convert an instance of PaginatedW9FormsModel to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java index a05f4bf..1657005 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java @@ -27,7 +27,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,56 +53,56 @@ import Avalara.SDK.JSON; /** - * PrimaryWithholdingAgent + * Primary withholding agent information for tax forms */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class PrimaryWithholdingAgent { - public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME = "primaryWithholdingAgentName"; - @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME) - private String primaryWithholdingAgentName; + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; - public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN = "primaryWithholdingAgentEin"; - @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN) - private String primaryWithholdingAgentEin; + public static final String SERIALIZED_NAME_EIN = "ein"; + @SerializedName(SERIALIZED_NAME_EIN) + private String ein; public PrimaryWithholdingAgent() { } - public PrimaryWithholdingAgent primaryWithholdingAgentName(String primaryWithholdingAgentName) { - this.primaryWithholdingAgentName = primaryWithholdingAgentName; + public PrimaryWithholdingAgent name(String name) { + this.name = name; return this; } /** - * Get primaryWithholdingAgentName - * @return primaryWithholdingAgentName + * Name of the primary withholding agent + * @return name */ @javax.annotation.Nullable - public String getPrimaryWithholdingAgentName() { - return primaryWithholdingAgentName; + public String getName() { + return name; } - public void setPrimaryWithholdingAgentName(String primaryWithholdingAgentName) { - this.primaryWithholdingAgentName = primaryWithholdingAgentName; + public void setName(String name) { + this.name = name; } - public PrimaryWithholdingAgent primaryWithholdingAgentEin(String primaryWithholdingAgentEin) { - this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; + public PrimaryWithholdingAgent ein(String ein) { + this.ein = ein; return this; } /** - * Get primaryWithholdingAgentEin - * @return primaryWithholdingAgentEin + * EIN (Employer Identification Number) of the primary withholding agent. + * @return ein */ @javax.annotation.Nullable - public String getPrimaryWithholdingAgentEin() { - return primaryWithholdingAgentEin; + public String getEin() { + return ein; } - public void setPrimaryWithholdingAgentEin(String primaryWithholdingAgentEin) { - this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; + public void setEin(String ein) { + this.ein = ein; } @@ -117,32 +116,21 @@ public boolean equals(Object o) { return false; } PrimaryWithholdingAgent primaryWithholdingAgent = (PrimaryWithholdingAgent) o; - return Objects.equals(this.primaryWithholdingAgentName, primaryWithholdingAgent.primaryWithholdingAgentName) && - Objects.equals(this.primaryWithholdingAgentEin, primaryWithholdingAgent.primaryWithholdingAgentEin); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + return Objects.equals(this.name, primaryWithholdingAgent.name) && + Objects.equals(this.ein, primaryWithholdingAgent.ein); } @Override public int hashCode() { - return Objects.hash(primaryWithholdingAgentName, primaryWithholdingAgentEin); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(name, ein); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PrimaryWithholdingAgent {\n"); - sb.append(" primaryWithholdingAgentName: ").append(toIndentedString(primaryWithholdingAgentName)).append("\n"); - sb.append(" primaryWithholdingAgentEin: ").append(toIndentedString(primaryWithholdingAgentEin)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); sb.append("}"); return sb.toString(); } @@ -165,11 +153,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("primaryWithholdingAgentName"); - openapiFields.add("primaryWithholdingAgentEin"); + openapiFields.add("name"); + openapiFields.add("ein"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("ein"); } /** @@ -192,12 +182,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrimaryWithholdingAgent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PrimaryWithholdingAgent.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("primaryWithholdingAgentName") != null && !jsonObj.get("primaryWithholdingAgentName").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentName").toString())); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if ((jsonObj.get("primaryWithholdingAgentEin") != null && !jsonObj.get("primaryWithholdingAgentEin").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentEin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentEin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentEin").toString())); + if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").toString())); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentRequest.java deleted file mode 100644 index c31645e..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentRequest.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * PrimaryWithholdingAgentRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class PrimaryWithholdingAgentRequest { - public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME = "primaryWithholdingAgentName"; - @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME) - private String primaryWithholdingAgentName; - - public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN = "primaryWithholdingAgentEin"; - @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN) - private String primaryWithholdingAgentEin; - - public PrimaryWithholdingAgentRequest() { - } - - public PrimaryWithholdingAgentRequest primaryWithholdingAgentName(String primaryWithholdingAgentName) { - this.primaryWithholdingAgentName = primaryWithholdingAgentName; - return this; - } - - /** - * Get primaryWithholdingAgentName - * @return primaryWithholdingAgentName - */ - @javax.annotation.Nullable - public String getPrimaryWithholdingAgentName() { - return primaryWithholdingAgentName; - } - - public void setPrimaryWithholdingAgentName(String primaryWithholdingAgentName) { - this.primaryWithholdingAgentName = primaryWithholdingAgentName; - } - - - public PrimaryWithholdingAgentRequest primaryWithholdingAgentEin(String primaryWithholdingAgentEin) { - this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; - return this; - } - - /** - * Get primaryWithholdingAgentEin - * @return primaryWithholdingAgentEin - */ - @javax.annotation.Nullable - public String getPrimaryWithholdingAgentEin() { - return primaryWithholdingAgentEin; - } - - public void setPrimaryWithholdingAgentEin(String primaryWithholdingAgentEin) { - this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PrimaryWithholdingAgentRequest primaryWithholdingAgentRequest = (PrimaryWithholdingAgentRequest) o; - return Objects.equals(this.primaryWithholdingAgentName, primaryWithholdingAgentRequest.primaryWithholdingAgentName) && - Objects.equals(this.primaryWithholdingAgentEin, primaryWithholdingAgentRequest.primaryWithholdingAgentEin); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(primaryWithholdingAgentName, primaryWithholdingAgentEin); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PrimaryWithholdingAgentRequest {\n"); - sb.append(" primaryWithholdingAgentName: ").append(toIndentedString(primaryWithholdingAgentName)).append("\n"); - sb.append(" primaryWithholdingAgentEin: ").append(toIndentedString(primaryWithholdingAgentEin)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("primaryWithholdingAgentName"); - openapiFields.add("primaryWithholdingAgentEin"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PrimaryWithholdingAgentRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PrimaryWithholdingAgentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PrimaryWithholdingAgentRequest is not found in the empty JSON string", PrimaryWithholdingAgentRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PrimaryWithholdingAgentRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrimaryWithholdingAgentRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("primaryWithholdingAgentName") != null && !jsonObj.get("primaryWithholdingAgentName").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentName").toString())); - } - if ((jsonObj.get("primaryWithholdingAgentEin") != null && !jsonObj.get("primaryWithholdingAgentEin").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentEin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentEin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentEin").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrimaryWithholdingAgentRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrimaryWithholdingAgentRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrimaryWithholdingAgentRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PrimaryWithholdingAgentRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PrimaryWithholdingAgentRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PrimaryWithholdingAgentRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrimaryWithholdingAgentRequest - * @throws IOException if the JSON string is invalid with respect to PrimaryWithholdingAgentRequest - */ - public static PrimaryWithholdingAgentRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrimaryWithholdingAgentRequest.class); - } - - /** - * Convert an instance of PrimaryWithholdingAgentRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentResponse.java deleted file mode 100644 index 949c213..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentResponse.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * PrimaryWithholdingAgentResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class PrimaryWithholdingAgentResponse { - public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME = "primaryWithholdingAgentName"; - @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME) - private String primaryWithholdingAgentName; - - public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN = "primaryWithholdingAgentEin"; - @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN) - private String primaryWithholdingAgentEin; - - public PrimaryWithholdingAgentResponse() { - } - - public PrimaryWithholdingAgentResponse primaryWithholdingAgentName(String primaryWithholdingAgentName) { - this.primaryWithholdingAgentName = primaryWithholdingAgentName; - return this; - } - - /** - * Get primaryWithholdingAgentName - * @return primaryWithholdingAgentName - */ - @javax.annotation.Nullable - public String getPrimaryWithholdingAgentName() { - return primaryWithholdingAgentName; - } - - public void setPrimaryWithholdingAgentName(String primaryWithholdingAgentName) { - this.primaryWithholdingAgentName = primaryWithholdingAgentName; - } - - - public PrimaryWithholdingAgentResponse primaryWithholdingAgentEin(String primaryWithholdingAgentEin) { - this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; - return this; - } - - /** - * Get primaryWithholdingAgentEin - * @return primaryWithholdingAgentEin - */ - @javax.annotation.Nullable - public String getPrimaryWithholdingAgentEin() { - return primaryWithholdingAgentEin; - } - - public void setPrimaryWithholdingAgentEin(String primaryWithholdingAgentEin) { - this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PrimaryWithholdingAgentResponse primaryWithholdingAgentResponse = (PrimaryWithholdingAgentResponse) o; - return Objects.equals(this.primaryWithholdingAgentName, primaryWithholdingAgentResponse.primaryWithholdingAgentName) && - Objects.equals(this.primaryWithholdingAgentEin, primaryWithholdingAgentResponse.primaryWithholdingAgentEin); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(primaryWithholdingAgentName, primaryWithholdingAgentEin); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PrimaryWithholdingAgentResponse {\n"); - sb.append(" primaryWithholdingAgentName: ").append(toIndentedString(primaryWithholdingAgentName)).append("\n"); - sb.append(" primaryWithholdingAgentEin: ").append(toIndentedString(primaryWithholdingAgentEin)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("primaryWithholdingAgentName"); - openapiFields.add("primaryWithholdingAgentEin"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to PrimaryWithholdingAgentResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!PrimaryWithholdingAgentResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PrimaryWithholdingAgentResponse is not found in the empty JSON string", PrimaryWithholdingAgentResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!PrimaryWithholdingAgentResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrimaryWithholdingAgentResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("primaryWithholdingAgentName") != null && !jsonObj.get("primaryWithholdingAgentName").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentName").toString())); - } - if ((jsonObj.get("primaryWithholdingAgentEin") != null && !jsonObj.get("primaryWithholdingAgentEin").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentEin").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentEin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentEin").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!PrimaryWithholdingAgentResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PrimaryWithholdingAgentResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PrimaryWithholdingAgentResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, PrimaryWithholdingAgentResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public PrimaryWithholdingAgentResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of PrimaryWithholdingAgentResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of PrimaryWithholdingAgentResponse - * @throws IOException if the JSON string is invalid with respect to PrimaryWithholdingAgentResponse - */ - public static PrimaryWithholdingAgentResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PrimaryWithholdingAgentResponse.class); - } - - /** - * Convert an instance of PrimaryWithholdingAgentResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ProblemDetails.java b/src/main/java/Avalara/SDK/model/A1099/V2/ProblemDetails.java deleted file mode 100644 index f2ab623..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ProblemDetails.java +++ /dev/null @@ -1,418 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * ProblemDetails - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class ProblemDetails { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private String title; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private Integer status; - - public static final String SERIALIZED_NAME_DETAIL = "detail"; - @SerializedName(SERIALIZED_NAME_DETAIL) - private String detail; - - public static final String SERIALIZED_NAME_INSTANCE = "instance"; - @SerializedName(SERIALIZED_NAME_INSTANCE) - private String instance; - - public ProblemDetails() { - } - - public ProblemDetails type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nullable - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - public ProblemDetails title(String title) { - this.title = title; - return this; - } - - /** - * Get title - * @return title - */ - @javax.annotation.Nullable - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - - public ProblemDetails status(Integer status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - - public ProblemDetails detail(String detail) { - this.detail = detail; - return this; - } - - /** - * Get detail - * @return detail - */ - @javax.annotation.Nullable - public String getDetail() { - return detail; - } - - public void setDetail(String detail) { - this.detail = detail; - } - - - public ProblemDetails instance(String instance) { - this.instance = instance; - return this; - } - - /** - * Get instance - * @return instance - */ - @javax.annotation.Nullable - public String getInstance() { - return instance; - } - - public void setInstance(String instance) { - this.instance = instance; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ProblemDetails instance itself - */ - public ProblemDetails putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProblemDetails problemDetails = (ProblemDetails) o; - return Objects.equals(this.type, problemDetails.type) && - Objects.equals(this.title, problemDetails.title) && - Objects.equals(this.status, problemDetails.status) && - Objects.equals(this.detail, problemDetails.detail) && - Objects.equals(this.instance, problemDetails.instance)&& - Objects.equals(this.additionalProperties, problemDetails.additionalProperties); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(type, title, status, detail, instance, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProblemDetails {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); - sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("title"); - openapiFields.add("status"); - openapiFields.add("detail"); - openapiFields.add("instance"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ProblemDetails - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ProblemDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ProblemDetails is not found in the empty JSON string", ProblemDetails.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); - } - if ((jsonObj.get("detail") != null && !jsonObj.get("detail").isJsonNull()) && !jsonObj.get("detail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `detail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("detail").toString())); - } - if ((jsonObj.get("instance") != null && !jsonObj.get("instance").isJsonNull()) && !jsonObj.get("instance").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `instance` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instance").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ProblemDetails.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ProblemDetails' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ProblemDetails.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ProblemDetails value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ProblemDetails read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ProblemDetails instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ProblemDetails given an JSON string - * - * @param jsonString JSON string - * @return An instance of ProblemDetails - * @throws IOException if the JSON string is invalid with respect to ProblemDetails - */ - public static ProblemDetails fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ProblemDetails.class); - } - - /** - * Convert an instance of ProblemDetails to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java index cd468aa..539bcfc 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java @@ -99,7 +99,7 @@ public StateAndLocalWithholding stateTaxWithheld(Double stateTaxWithheld) { } /** - * Get stateTaxWithheld + * Amount of state tax that was withheld * @return stateTaxWithheld */ @javax.annotation.Nullable @@ -118,7 +118,7 @@ public StateAndLocalWithholding state(String state) { } /** - * Get state + * US state * @return state */ @javax.annotation.Nullable @@ -137,7 +137,7 @@ public StateAndLocalWithholding stateIdNumber(String stateIdNumber) { } /** - * Get stateIdNumber + * State ID number of the entity issuing the form * @return stateIdNumber */ @javax.annotation.Nullable @@ -156,7 +156,7 @@ public StateAndLocalWithholding stateIncome(Double stateIncome) { } /** - * Get stateIncome + * Amount of state income * @return stateIncome */ @javax.annotation.Nullable @@ -175,7 +175,7 @@ public StateAndLocalWithholding localTaxWithheld(Double localTaxWithheld) { } /** - * Get localTaxWithheld + * Amount of local tax that was withheld * @return localTaxWithheld */ @javax.annotation.Nullable @@ -194,7 +194,7 @@ public StateAndLocalWithholding locality(String locality) { } /** - * Get locality + * Locality name * @return locality */ @javax.annotation.Nullable @@ -213,7 +213,7 @@ public StateAndLocalWithholding localityIdNumber(String localityIdNumber) { } /** - * Get localityIdNumber + * Locality ID number of the entity issuing the form * @return localityIdNumber */ @javax.annotation.Nullable @@ -232,7 +232,7 @@ public StateAndLocalWithholding localIncome(Double localIncome) { } /** - * Get localIncome + * Amount of local income * @return localIncome */ @javax.annotation.Nullable diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingRequest.java deleted file mode 100644 index 3df4724..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingRequest.java +++ /dev/null @@ -1,415 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * StateAndLocalWithholdingRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class StateAndLocalWithholdingRequest { - public static final String SERIALIZED_NAME_STATE_TAX_WITHHELD = "stateTaxWithheld"; - @SerializedName(SERIALIZED_NAME_STATE_TAX_WITHHELD) - private Double stateTaxWithheld; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_STATE_ID_NUMBER = "stateIdNumber"; - @SerializedName(SERIALIZED_NAME_STATE_ID_NUMBER) - private String stateIdNumber; - - public static final String SERIALIZED_NAME_STATE_INCOME = "stateIncome"; - @SerializedName(SERIALIZED_NAME_STATE_INCOME) - private Double stateIncome; - - public static final String SERIALIZED_NAME_LOCAL_TAX_WITHHELD = "localTaxWithheld"; - @SerializedName(SERIALIZED_NAME_LOCAL_TAX_WITHHELD) - private Double localTaxWithheld; - - public static final String SERIALIZED_NAME_LOCALITY = "locality"; - @SerializedName(SERIALIZED_NAME_LOCALITY) - private String locality; - - public static final String SERIALIZED_NAME_LOCALITY_ID_NUMBER = "localityIdNumber"; - @SerializedName(SERIALIZED_NAME_LOCALITY_ID_NUMBER) - private String localityIdNumber; - - public static final String SERIALIZED_NAME_LOCAL_INCOME = "localIncome"; - @SerializedName(SERIALIZED_NAME_LOCAL_INCOME) - private Double localIncome; - - public StateAndLocalWithholdingRequest() { - } - - public StateAndLocalWithholdingRequest stateTaxWithheld(Double stateTaxWithheld) { - this.stateTaxWithheld = stateTaxWithheld; - return this; - } - - /** - * Get stateTaxWithheld - * @return stateTaxWithheld - */ - @javax.annotation.Nullable - public Double getStateTaxWithheld() { - return stateTaxWithheld; - } - - public void setStateTaxWithheld(Double stateTaxWithheld) { - this.stateTaxWithheld = stateTaxWithheld; - } - - - public StateAndLocalWithholdingRequest state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public StateAndLocalWithholdingRequest stateIdNumber(String stateIdNumber) { - this.stateIdNumber = stateIdNumber; - return this; - } - - /** - * Get stateIdNumber - * @return stateIdNumber - */ - @javax.annotation.Nullable - public String getStateIdNumber() { - return stateIdNumber; - } - - public void setStateIdNumber(String stateIdNumber) { - this.stateIdNumber = stateIdNumber; - } - - - public StateAndLocalWithholdingRequest stateIncome(Double stateIncome) { - this.stateIncome = stateIncome; - return this; - } - - /** - * Get stateIncome - * @return stateIncome - */ - @javax.annotation.Nullable - public Double getStateIncome() { - return stateIncome; - } - - public void setStateIncome(Double stateIncome) { - this.stateIncome = stateIncome; - } - - - public StateAndLocalWithholdingRequest localTaxWithheld(Double localTaxWithheld) { - this.localTaxWithheld = localTaxWithheld; - return this; - } - - /** - * Get localTaxWithheld - * @return localTaxWithheld - */ - @javax.annotation.Nullable - public Double getLocalTaxWithheld() { - return localTaxWithheld; - } - - public void setLocalTaxWithheld(Double localTaxWithheld) { - this.localTaxWithheld = localTaxWithheld; - } - - - public StateAndLocalWithholdingRequest locality(String locality) { - this.locality = locality; - return this; - } - - /** - * Get locality - * @return locality - */ - @javax.annotation.Nullable - public String getLocality() { - return locality; - } - - public void setLocality(String locality) { - this.locality = locality; - } - - - public StateAndLocalWithholdingRequest localityIdNumber(String localityIdNumber) { - this.localityIdNumber = localityIdNumber; - return this; - } - - /** - * Get localityIdNumber - * @return localityIdNumber - */ - @javax.annotation.Nullable - public String getLocalityIdNumber() { - return localityIdNumber; - } - - public void setLocalityIdNumber(String localityIdNumber) { - this.localityIdNumber = localityIdNumber; - } - - - public StateAndLocalWithholdingRequest localIncome(Double localIncome) { - this.localIncome = localIncome; - return this; - } - - /** - * Get localIncome - * @return localIncome - */ - @javax.annotation.Nullable - public Double getLocalIncome() { - return localIncome; - } - - public void setLocalIncome(Double localIncome) { - this.localIncome = localIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StateAndLocalWithholdingRequest stateAndLocalWithholdingRequest = (StateAndLocalWithholdingRequest) o; - return Objects.equals(this.stateTaxWithheld, stateAndLocalWithholdingRequest.stateTaxWithheld) && - Objects.equals(this.state, stateAndLocalWithholdingRequest.state) && - Objects.equals(this.stateIdNumber, stateAndLocalWithholdingRequest.stateIdNumber) && - Objects.equals(this.stateIncome, stateAndLocalWithholdingRequest.stateIncome) && - Objects.equals(this.localTaxWithheld, stateAndLocalWithholdingRequest.localTaxWithheld) && - Objects.equals(this.locality, stateAndLocalWithholdingRequest.locality) && - Objects.equals(this.localityIdNumber, stateAndLocalWithholdingRequest.localityIdNumber) && - Objects.equals(this.localIncome, stateAndLocalWithholdingRequest.localIncome); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(stateTaxWithheld, state, stateIdNumber, stateIncome, localTaxWithheld, locality, localityIdNumber, localIncome); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StateAndLocalWithholdingRequest {\n"); - sb.append(" stateTaxWithheld: ").append(toIndentedString(stateTaxWithheld)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" stateIdNumber: ").append(toIndentedString(stateIdNumber)).append("\n"); - sb.append(" stateIncome: ").append(toIndentedString(stateIncome)).append("\n"); - sb.append(" localTaxWithheld: ").append(toIndentedString(localTaxWithheld)).append("\n"); - sb.append(" locality: ").append(toIndentedString(locality)).append("\n"); - sb.append(" localityIdNumber: ").append(toIndentedString(localityIdNumber)).append("\n"); - sb.append(" localIncome: ").append(toIndentedString(localIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("stateTaxWithheld"); - openapiFields.add("state"); - openapiFields.add("stateIdNumber"); - openapiFields.add("stateIncome"); - openapiFields.add("localTaxWithheld"); - openapiFields.add("locality"); - openapiFields.add("localityIdNumber"); - openapiFields.add("localIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StateAndLocalWithholdingRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StateAndLocalWithholdingRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StateAndLocalWithholdingRequest is not found in the empty JSON string", StateAndLocalWithholdingRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StateAndLocalWithholdingRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StateAndLocalWithholdingRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("stateIdNumber") != null && !jsonObj.get("stateIdNumber").isJsonNull()) && !jsonObj.get("stateIdNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stateIdNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stateIdNumber").toString())); - } - if ((jsonObj.get("locality") != null && !jsonObj.get("locality").isJsonNull()) && !jsonObj.get("locality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `locality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locality").toString())); - } - if ((jsonObj.get("localityIdNumber") != null && !jsonObj.get("localityIdNumber").isJsonNull()) && !jsonObj.get("localityIdNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `localityIdNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("localityIdNumber").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StateAndLocalWithholdingRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StateAndLocalWithholdingRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StateAndLocalWithholdingRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StateAndLocalWithholdingRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StateAndLocalWithholdingRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StateAndLocalWithholdingRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of StateAndLocalWithholdingRequest - * @throws IOException if the JSON string is invalid with respect to StateAndLocalWithholdingRequest - */ - public static StateAndLocalWithholdingRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StateAndLocalWithholdingRequest.class); - } - - /** - * Convert an instance of StateAndLocalWithholdingRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingResponse.java deleted file mode 100644 index 14b07b4..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingResponse.java +++ /dev/null @@ -1,415 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * StateAndLocalWithholdingResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class StateAndLocalWithholdingResponse { - public static final String SERIALIZED_NAME_STATE_TAX_WITHHELD = "stateTaxWithheld"; - @SerializedName(SERIALIZED_NAME_STATE_TAX_WITHHELD) - private Double stateTaxWithheld; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_STATE_ID_NUMBER = "stateIdNumber"; - @SerializedName(SERIALIZED_NAME_STATE_ID_NUMBER) - private String stateIdNumber; - - public static final String SERIALIZED_NAME_STATE_INCOME = "stateIncome"; - @SerializedName(SERIALIZED_NAME_STATE_INCOME) - private Double stateIncome; - - public static final String SERIALIZED_NAME_LOCAL_TAX_WITHHELD = "localTaxWithheld"; - @SerializedName(SERIALIZED_NAME_LOCAL_TAX_WITHHELD) - private Double localTaxWithheld; - - public static final String SERIALIZED_NAME_LOCALITY = "locality"; - @SerializedName(SERIALIZED_NAME_LOCALITY) - private String locality; - - public static final String SERIALIZED_NAME_LOCALITY_ID_NUMBER = "localityIdNumber"; - @SerializedName(SERIALIZED_NAME_LOCALITY_ID_NUMBER) - private String localityIdNumber; - - public static final String SERIALIZED_NAME_LOCAL_INCOME = "localIncome"; - @SerializedName(SERIALIZED_NAME_LOCAL_INCOME) - private Double localIncome; - - public StateAndLocalWithholdingResponse() { - } - - public StateAndLocalWithholdingResponse stateTaxWithheld(Double stateTaxWithheld) { - this.stateTaxWithheld = stateTaxWithheld; - return this; - } - - /** - * Amount of state tax that was withheld - * @return stateTaxWithheld - */ - @javax.annotation.Nullable - public Double getStateTaxWithheld() { - return stateTaxWithheld; - } - - public void setStateTaxWithheld(Double stateTaxWithheld) { - this.stateTaxWithheld = stateTaxWithheld; - } - - - public StateAndLocalWithholdingResponse state(String state) { - this.state = state; - return this; - } - - /** - * US state - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public StateAndLocalWithholdingResponse stateIdNumber(String stateIdNumber) { - this.stateIdNumber = stateIdNumber; - return this; - } - - /** - * State ID number of the entity issuing the form - * @return stateIdNumber - */ - @javax.annotation.Nullable - public String getStateIdNumber() { - return stateIdNumber; - } - - public void setStateIdNumber(String stateIdNumber) { - this.stateIdNumber = stateIdNumber; - } - - - public StateAndLocalWithholdingResponse stateIncome(Double stateIncome) { - this.stateIncome = stateIncome; - return this; - } - - /** - * Amount of state income - * @return stateIncome - */ - @javax.annotation.Nullable - public Double getStateIncome() { - return stateIncome; - } - - public void setStateIncome(Double stateIncome) { - this.stateIncome = stateIncome; - } - - - public StateAndLocalWithholdingResponse localTaxWithheld(Double localTaxWithheld) { - this.localTaxWithheld = localTaxWithheld; - return this; - } - - /** - * Amount of local tax that was withheld - * @return localTaxWithheld - */ - @javax.annotation.Nullable - public Double getLocalTaxWithheld() { - return localTaxWithheld; - } - - public void setLocalTaxWithheld(Double localTaxWithheld) { - this.localTaxWithheld = localTaxWithheld; - } - - - public StateAndLocalWithholdingResponse locality(String locality) { - this.locality = locality; - return this; - } - - /** - * Locality name - * @return locality - */ - @javax.annotation.Nullable - public String getLocality() { - return locality; - } - - public void setLocality(String locality) { - this.locality = locality; - } - - - public StateAndLocalWithholdingResponse localityIdNumber(String localityIdNumber) { - this.localityIdNumber = localityIdNumber; - return this; - } - - /** - * Locality ID number of the entity issuing the form - * @return localityIdNumber - */ - @javax.annotation.Nullable - public String getLocalityIdNumber() { - return localityIdNumber; - } - - public void setLocalityIdNumber(String localityIdNumber) { - this.localityIdNumber = localityIdNumber; - } - - - public StateAndLocalWithholdingResponse localIncome(Double localIncome) { - this.localIncome = localIncome; - return this; - } - - /** - * Amount of local income - * @return localIncome - */ - @javax.annotation.Nullable - public Double getLocalIncome() { - return localIncome; - } - - public void setLocalIncome(Double localIncome) { - this.localIncome = localIncome; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StateAndLocalWithholdingResponse stateAndLocalWithholdingResponse = (StateAndLocalWithholdingResponse) o; - return Objects.equals(this.stateTaxWithheld, stateAndLocalWithholdingResponse.stateTaxWithheld) && - Objects.equals(this.state, stateAndLocalWithholdingResponse.state) && - Objects.equals(this.stateIdNumber, stateAndLocalWithholdingResponse.stateIdNumber) && - Objects.equals(this.stateIncome, stateAndLocalWithholdingResponse.stateIncome) && - Objects.equals(this.localTaxWithheld, stateAndLocalWithholdingResponse.localTaxWithheld) && - Objects.equals(this.locality, stateAndLocalWithholdingResponse.locality) && - Objects.equals(this.localityIdNumber, stateAndLocalWithholdingResponse.localityIdNumber) && - Objects.equals(this.localIncome, stateAndLocalWithholdingResponse.localIncome); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(stateTaxWithheld, state, stateIdNumber, stateIncome, localTaxWithheld, locality, localityIdNumber, localIncome); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StateAndLocalWithholdingResponse {\n"); - sb.append(" stateTaxWithheld: ").append(toIndentedString(stateTaxWithheld)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" stateIdNumber: ").append(toIndentedString(stateIdNumber)).append("\n"); - sb.append(" stateIncome: ").append(toIndentedString(stateIncome)).append("\n"); - sb.append(" localTaxWithheld: ").append(toIndentedString(localTaxWithheld)).append("\n"); - sb.append(" locality: ").append(toIndentedString(locality)).append("\n"); - sb.append(" localityIdNumber: ").append(toIndentedString(localityIdNumber)).append("\n"); - sb.append(" localIncome: ").append(toIndentedString(localIncome)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("stateTaxWithheld"); - openapiFields.add("state"); - openapiFields.add("stateIdNumber"); - openapiFields.add("stateIncome"); - openapiFields.add("localTaxWithheld"); - openapiFields.add("locality"); - openapiFields.add("localityIdNumber"); - openapiFields.add("localIncome"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StateAndLocalWithholdingResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StateAndLocalWithholdingResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StateAndLocalWithholdingResponse is not found in the empty JSON string", StateAndLocalWithholdingResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StateAndLocalWithholdingResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StateAndLocalWithholdingResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("stateIdNumber") != null && !jsonObj.get("stateIdNumber").isJsonNull()) && !jsonObj.get("stateIdNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `stateIdNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("stateIdNumber").toString())); - } - if ((jsonObj.get("locality") != null && !jsonObj.get("locality").isJsonNull()) && !jsonObj.get("locality").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `locality` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locality").toString())); - } - if ((jsonObj.get("localityIdNumber") != null && !jsonObj.get("localityIdNumber").isJsonNull()) && !jsonObj.get("localityIdNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `localityIdNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("localityIdNumber").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StateAndLocalWithholdingResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StateAndLocalWithholdingResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StateAndLocalWithholdingResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StateAndLocalWithholdingResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StateAndLocalWithholdingResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StateAndLocalWithholdingResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of StateAndLocalWithholdingResponse - * @throws IOException if the JSON string is invalid with respect to StateAndLocalWithholdingResponse - */ - public static StateAndLocalWithholdingResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StateAndLocalWithholdingResponse.class); - } - - /** - * Convert an instance of StateAndLocalWithholdingResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailApp.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailApp.java deleted file mode 100644 index 6662749..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailApp.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * StateEfileStatusDetailApp - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class StateEfileStatusDetailApp { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_TIME = "time"; - @SerializedName(SERIALIZED_NAME_TIME) - private String time; - - public static final String SERIALIZED_NAME_JURISDICTION = "jurisdiction"; - @SerializedName(SERIALIZED_NAME_JURISDICTION) - private String jurisdiction; - - public StateEfileStatusDetailApp() { - } - - public StateEfileStatusDetailApp status(String status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - - public StateEfileStatusDetailApp time(String time) { - this.time = time; - return this; - } - - /** - * Get time - * @return time - */ - @javax.annotation.Nullable - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - - public StateEfileStatusDetailApp jurisdiction(String jurisdiction) { - this.jurisdiction = jurisdiction; - return this; - } - - /** - * Get jurisdiction - * @return jurisdiction - */ - @javax.annotation.Nullable - public String getJurisdiction() { - return jurisdiction; - } - - public void setJurisdiction(String jurisdiction) { - this.jurisdiction = jurisdiction; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StateEfileStatusDetailApp stateEfileStatusDetailApp = (StateEfileStatusDetailApp) o; - return Objects.equals(this.status, stateEfileStatusDetailApp.status) && - Objects.equals(this.time, stateEfileStatusDetailApp.time) && - Objects.equals(this.jurisdiction, stateEfileStatusDetailApp.jurisdiction); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(status, time, jurisdiction); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StateEfileStatusDetailApp {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append(" jurisdiction: ").append(toIndentedString(jurisdiction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - openapiFields.add("time"); - openapiFields.add("jurisdiction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StateEfileStatusDetailApp - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StateEfileStatusDetailApp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StateEfileStatusDetailApp is not found in the empty JSON string", StateEfileStatusDetailApp.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StateEfileStatusDetailApp.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StateEfileStatusDetailApp` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - if ((jsonObj.get("time") != null && !jsonObj.get("time").isJsonNull()) && !jsonObj.get("time").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time").toString())); - } - if ((jsonObj.get("jurisdiction") != null && !jsonObj.get("jurisdiction").isJsonNull()) && !jsonObj.get("jurisdiction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jurisdiction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jurisdiction").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StateEfileStatusDetailApp.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StateEfileStatusDetailApp' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StateEfileStatusDetailApp.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StateEfileStatusDetailApp value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StateEfileStatusDetailApp read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StateEfileStatusDetailApp given an JSON string - * - * @param jsonString JSON string - * @return An instance of StateEfileStatusDetailApp - * @throws IOException if the JSON string is invalid with respect to StateEfileStatusDetailApp - */ - public static StateEfileStatusDetailApp fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StateEfileStatusDetailApp.class); - } - - /** - * Convert an instance of StateEfileStatusDetailApp to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailResponse.java deleted file mode 100644 index ee0fe56..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailResponse.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * StateEfileStatusDetailResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class StateEfileStatusDetailResponse { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private String status; - - public static final String SERIALIZED_NAME_TIME = "time"; - @SerializedName(SERIALIZED_NAME_TIME) - private String time; - - public static final String SERIALIZED_NAME_JURISDICTION = "jurisdiction"; - @SerializedName(SERIALIZED_NAME_JURISDICTION) - private String jurisdiction; - - public StateEfileStatusDetailResponse() { - } - - public StateEfileStatusDetailResponse status(String status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - - public StateEfileStatusDetailResponse time(String time) { - this.time = time; - return this; - } - - /** - * Get time - * @return time - */ - @javax.annotation.Nullable - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - - public StateEfileStatusDetailResponse jurisdiction(String jurisdiction) { - this.jurisdiction = jurisdiction; - return this; - } - - /** - * Get jurisdiction - * @return jurisdiction - */ - @javax.annotation.Nullable - public String getJurisdiction() { - return jurisdiction; - } - - public void setJurisdiction(String jurisdiction) { - this.jurisdiction = jurisdiction; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - StateEfileStatusDetailResponse stateEfileStatusDetailResponse = (StateEfileStatusDetailResponse) o; - return Objects.equals(this.status, stateEfileStatusDetailResponse.status) && - Objects.equals(this.time, stateEfileStatusDetailResponse.time) && - Objects.equals(this.jurisdiction, stateEfileStatusDetailResponse.jurisdiction); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(status, time, jurisdiction); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class StateEfileStatusDetailResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append(" jurisdiction: ").append(toIndentedString(jurisdiction)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - openapiFields.add("time"); - openapiFields.add("jurisdiction"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to StateEfileStatusDetailResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!StateEfileStatusDetailResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StateEfileStatusDetailResponse is not found in the empty JSON string", StateEfileStatusDetailResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!StateEfileStatusDetailResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StateEfileStatusDetailResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } - if ((jsonObj.get("time") != null && !jsonObj.get("time").isJsonNull()) && !jsonObj.get("time").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time").toString())); - } - if ((jsonObj.get("jurisdiction") != null && !jsonObj.get("jurisdiction").isJsonNull()) && !jsonObj.get("jurisdiction").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `jurisdiction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jurisdiction").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!StateEfileStatusDetailResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'StateEfileStatusDetailResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(StateEfileStatusDetailResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, StateEfileStatusDetailResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public StateEfileStatusDetailResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of StateEfileStatusDetailResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of StateEfileStatusDetailResponse - * @throws IOException if the JSON string is invalid with respect to StateEfileStatusDetailResponse - */ - public static StateEfileStatusDetailResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, StateEfileStatusDetailResponse.class); - } - - /** - * Convert an instance of StateEfileStatusDetailResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Update1099Form200Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/Update1099Form200Response.java deleted file mode 100644 index 8f255c4..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Update1099Form200Response.java +++ /dev/null @@ -1,597 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualRequest; -import Avalara.SDK.model.A1099.V2.Form1042SResponse; -import Avalara.SDK.model.A1099.V2.Form1095BResponse; -import Avalara.SDK.model.A1099.V2.Form1099DivResponse; -import Avalara.SDK.model.A1099.V2.Form1099IntResponse; -import Avalara.SDK.model.A1099.V2.Form1099KResponse; -import Avalara.SDK.model.A1099.V2.Form1099MiscResponse; -import Avalara.SDK.model.A1099.V2.Form1099NecResponse; -import Avalara.SDK.model.A1099.V2.Form1099RResponse; -import Avalara.SDK.model.A1099.V2.FormResponseBase; -import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; -import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import Avalara.SDK.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Update1099Form200Response extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(Update1099Form200Response.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Update1099Form200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Update1099Form200Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterFormResponseBase = gson.getDelegateAdapter(this, TypeToken.get(FormResponseBase.class)); - final TypeAdapter adapterForm1042SResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1042SResponse.class)); - final TypeAdapter adapterForm1095BResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1095BResponse.class)); - final TypeAdapter adapterForm1099DivResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivResponse.class)); - final TypeAdapter adapterForm1099IntResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099IntResponse.class)); - final TypeAdapter adapterForm1099KResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099KResponse.class)); - final TypeAdapter adapterForm1099MiscResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscResponse.class)); - final TypeAdapter adapterForm1099NecResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecResponse.class)); - final TypeAdapter adapterForm1099RResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099RResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Update1099Form200Response value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `FormResponseBase` - if (value.getActualInstance() instanceof FormResponseBase) { - JsonElement element = adapterFormResponseBase.toJsonTree((FormResponseBase)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1042SResponse` - if (value.getActualInstance() instanceof Form1042SResponse) { - JsonElement element = adapterForm1042SResponse.toJsonTree((Form1042SResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1095BResponse` - if (value.getActualInstance() instanceof Form1095BResponse) { - JsonElement element = adapterForm1095BResponse.toJsonTree((Form1095BResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099DivResponse` - if (value.getActualInstance() instanceof Form1099DivResponse) { - JsonElement element = adapterForm1099DivResponse.toJsonTree((Form1099DivResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099IntResponse` - if (value.getActualInstance() instanceof Form1099IntResponse) { - JsonElement element = adapterForm1099IntResponse.toJsonTree((Form1099IntResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099KResponse` - if (value.getActualInstance() instanceof Form1099KResponse) { - JsonElement element = adapterForm1099KResponse.toJsonTree((Form1099KResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099MiscResponse` - if (value.getActualInstance() instanceof Form1099MiscResponse) { - JsonElement element = adapterForm1099MiscResponse.toJsonTree((Form1099MiscResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099NecResponse` - if (value.getActualInstance() instanceof Form1099NecResponse) { - JsonElement element = adapterForm1099NecResponse.toJsonTree((Form1099NecResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `Form1099RResponse` - if (value.getActualInstance() instanceof Form1099RResponse) { - JsonElement element = adapterForm1099RResponse.toJsonTree((Form1099RResponse)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase"); - } - - @Override - public Update1099Form200Response read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize FormResponseBase - try { - // validate the JSON object to see if any exception is thrown - FormResponseBase.validateJsonElement(jsonElement); - actualAdapter = adapterFormResponseBase; - match++; - log.log(Level.FINER, "Input data matches schema 'FormResponseBase'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for FormResponseBase failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'FormResponseBase'", e); - } - // deserialize Form1042SResponse - try { - // validate the JSON object to see if any exception is thrown - Form1042SResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1042SResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1042SResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1042SResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1042SResponse'", e); - } - // deserialize Form1095BResponse - try { - // validate the JSON object to see if any exception is thrown - Form1095BResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1095BResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1095BResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1095BResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1095BResponse'", e); - } - // deserialize Form1099DivResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099DivResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099DivResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099DivResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099DivResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099DivResponse'", e); - } - // deserialize Form1099IntResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099IntResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099IntResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099IntResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099IntResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099IntResponse'", e); - } - // deserialize Form1099KResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099KResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099KResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099KResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099KResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099KResponse'", e); - } - // deserialize Form1099MiscResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099MiscResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099MiscResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099MiscResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099MiscResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099MiscResponse'", e); - } - // deserialize Form1099NecResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099NecResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099NecResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099NecResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099NecResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099NecResponse'", e); - } - // deserialize Form1099RResponse - try { - // validate the JSON object to see if any exception is thrown - Form1099RResponse.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099RResponse; - match++; - log.log(Level.FINER, "Input data matches schema 'Form1099RResponse'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Form1099RResponse failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Form1099RResponse'", e); - } - - if (match == 1) { - Update1099Form200Response ret = new Update1099Form200Response(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format("Failed deserialization for Update1099Form200Response: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public Update1099Form200Response() { - super("oneOf", Boolean.FALSE); - } - - public Update1099Form200Response(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("FormResponseBase", FormResponseBase.class); - schemas.put("Form1042SResponse", Form1042SResponse.class); - schemas.put("Form1095BResponse", Form1095BResponse.class); - schemas.put("Form1099DivResponse", Form1099DivResponse.class); - schemas.put("Form1099IntResponse", Form1099IntResponse.class); - schemas.put("Form1099KResponse", Form1099KResponse.class); - schemas.put("Form1099MiscResponse", Form1099MiscResponse.class); - schemas.put("Form1099NecResponse", Form1099NecResponse.class); - schemas.put("Form1099RResponse", Form1099RResponse.class); - } - - @Override - public Map> getSchemas() { - return Update1099Form200Response.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof FormResponseBase) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1042SResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1095BResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099DivResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099IntResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099KResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099MiscResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099NecResponse) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof Form1099RResponse) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase"); - } - - /** - * Get the actual instance, which can be the following: - * Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase - * - * @return The actual instance (Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `FormResponseBase`. If the actual instance is not `FormResponseBase`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `FormResponseBase` - * @throws ClassCastException if the instance is not `FormResponseBase` - */ - public FormResponseBase getFormResponseBase() throws ClassCastException { - return (FormResponseBase)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1042SResponse`. If the actual instance is not `Form1042SResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1042SResponse` - * @throws ClassCastException if the instance is not `Form1042SResponse` - */ - public Form1042SResponse getForm1042SResponse() throws ClassCastException { - return (Form1042SResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1095BResponse`. If the actual instance is not `Form1095BResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1095BResponse` - * @throws ClassCastException if the instance is not `Form1095BResponse` - */ - public Form1095BResponse getForm1095BResponse() throws ClassCastException { - return (Form1095BResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099DivResponse`. If the actual instance is not `Form1099DivResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099DivResponse` - * @throws ClassCastException if the instance is not `Form1099DivResponse` - */ - public Form1099DivResponse getForm1099DivResponse() throws ClassCastException { - return (Form1099DivResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099IntResponse`. If the actual instance is not `Form1099IntResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099IntResponse` - * @throws ClassCastException if the instance is not `Form1099IntResponse` - */ - public Form1099IntResponse getForm1099IntResponse() throws ClassCastException { - return (Form1099IntResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099KResponse`. If the actual instance is not `Form1099KResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099KResponse` - * @throws ClassCastException if the instance is not `Form1099KResponse` - */ - public Form1099KResponse getForm1099KResponse() throws ClassCastException { - return (Form1099KResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099MiscResponse`. If the actual instance is not `Form1099MiscResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099MiscResponse` - * @throws ClassCastException if the instance is not `Form1099MiscResponse` - */ - public Form1099MiscResponse getForm1099MiscResponse() throws ClassCastException { - return (Form1099MiscResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099NecResponse`. If the actual instance is not `Form1099NecResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099NecResponse` - * @throws ClassCastException if the instance is not `Form1099NecResponse` - */ - public Form1099NecResponse getForm1099NecResponse() throws ClassCastException { - return (Form1099NecResponse)super.getActualInstance(); - } - /** - * Get the actual instance of `Form1099RResponse`. If the actual instance is not `Form1099RResponse`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `Form1099RResponse` - * @throws ClassCastException if the instance is not `Form1099RResponse` - */ - public Form1099RResponse getForm1099RResponse() throws ClassCastException { - return (Form1099RResponse)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Update1099Form200Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with FormResponseBase - try { - FormResponseBase.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for FormResponseBase failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1042SResponse - try { - Form1042SResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1042SResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1095BResponse - try { - Form1095BResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1095BResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099DivResponse - try { - Form1099DivResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099DivResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099IntResponse - try { - Form1099IntResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099IntResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099KResponse - try { - Form1099KResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099KResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099MiscResponse - try { - Form1099MiscResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099MiscResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099NecResponse - try { - Form1099NecResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099NecResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with Form1099RResponse - try { - Form1099RResponse.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099RResponse failed with `%s`.", e.getMessage())); - // continue to the next one - } - if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Update1099Form200Response with oneOf schemas: Form1042SResponse, Form1095BResponse, Form1099DivResponse, Form1099IntResponse, Form1099KResponse, Form1099MiscResponse, Form1099NecResponse, Form1099RResponse, FormResponseBase. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of Update1099Form200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of Update1099Form200Response - * @throws IOException if the JSON string is invalid with respect to Update1099Form200Response - */ - public static Update1099Form200Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Update1099Form200Response.class); - } - - /** - * Convert an instance of Update1099Form200Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java b/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java index 8686c0d..7ef87ea 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java @@ -77,7 +77,7 @@ public ValidationError field(String field) { } /** - * Get field + * The field containing the error * @return field */ @javax.annotation.Nullable @@ -104,7 +104,7 @@ public ValidationError addErrorsItem(String errorsItem) { } /** - * Get errors + * The list of error messages * @return errors */ @javax.annotation.Nullable diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ValidationErrorApp.java b/src/main/java/Avalara/SDK/model/A1099/V2/ValidationErrorApp.java deleted file mode 100644 index fd31062..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ValidationErrorApp.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * ValidationErrorApp - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class ValidationErrorApp { - public static final String SERIALIZED_NAME_FIELD = "field"; - @SerializedName(SERIALIZED_NAME_FIELD) - private String field; - - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors; - - public ValidationErrorApp() { - } - - public ValidationErrorApp field(String field) { - this.field = field; - return this; - } - - /** - * Get field - * @return field - */ - @javax.annotation.Nullable - public String getField() { - return field; - } - - public void setField(String field) { - this.field = field; - } - - - public ValidationErrorApp errors(List errors) { - this.errors = errors; - return this; - } - - public ValidationErrorApp addErrorsItem(String errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - return this; - } - - /** - * Get errors - * @return errors - */ - @javax.annotation.Nullable - public List getErrors() { - return errors; - } - - public void setErrors(List errors) { - this.errors = errors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ValidationErrorApp validationErrorApp = (ValidationErrorApp) o; - return Objects.equals(this.field, validationErrorApp.field) && - Objects.equals(this.errors, validationErrorApp.errors); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(field, errors); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ValidationErrorApp {\n"); - sb.append(" field: ").append(toIndentedString(field)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("field"); - openapiFields.add("errors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ValidationErrorApp - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ValidationErrorApp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationErrorApp is not found in the empty JSON string", ValidationErrorApp.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ValidationErrorApp.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValidationErrorApp` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull() && !jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ValidationErrorApp.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ValidationErrorApp' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ValidationErrorApp.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ValidationErrorApp value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ValidationErrorApp read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ValidationErrorApp given an JSON string - * - * @param jsonString JSON string - * @return An instance of ValidationErrorApp - * @throws IOException if the JSON string is invalid with respect to ValidationErrorApp - */ - public static ValidationErrorApp fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ValidationErrorApp.class); - } - - /** - * Convert an instance of ValidationErrorApp to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ValidationErrorResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/ValidationErrorResponse.java deleted file mode 100644 index 947cd3d..0000000 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ValidationErrorResponse.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara 1099 & W-9 API Definition - * - * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.A1099.V2; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * ValidationErrorResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class ValidationErrorResponse { - public static final String SERIALIZED_NAME_FIELD = "field"; - @SerializedName(SERIALIZED_NAME_FIELD) - private String field; - - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors; - - public ValidationErrorResponse() { - } - - public ValidationErrorResponse field(String field) { - this.field = field; - return this; - } - - /** - * The field containing the error - * @return field - */ - @javax.annotation.Nullable - public String getField() { - return field; - } - - public void setField(String field) { - this.field = field; - } - - - public ValidationErrorResponse errors(List errors) { - this.errors = errors; - return this; - } - - public ValidationErrorResponse addErrorsItem(String errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - return this; - } - - /** - * The list of error messages - * @return errors - */ - @javax.annotation.Nullable - public List getErrors() { - return errors; - } - - public void setErrors(List errors) { - this.errors = errors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ValidationErrorResponse validationErrorResponse = (ValidationErrorResponse) o; - return Objects.equals(this.field, validationErrorResponse.field) && - Objects.equals(this.errors, validationErrorResponse.errors); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(field, errors); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ValidationErrorResponse {\n"); - sb.append(" field: ").append(toIndentedString(field)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("field"); - openapiFields.add("errors"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ValidationErrorResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ValidationErrorResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationErrorResponse is not found in the empty JSON string", ValidationErrorResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ValidationErrorResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValidationErrorResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull() && !jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ValidationErrorResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ValidationErrorResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ValidationErrorResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ValidationErrorResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ValidationErrorResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ValidationErrorResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ValidationErrorResponse - * @throws IOException if the JSON string is invalid with respect to ValidationErrorResponse - */ - public static ValidationErrorResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ValidationErrorResponse.class); - } - - /** - * Convert an instance of ValidationErrorResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java new file mode 100644 index 0000000..fc586b1 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java @@ -0,0 +1,467 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * W4FormMinimalRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W4FormMinimalRequest { + /** + * The form type (always \"w4\" for this model). + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME) + private String employeeFirstName; + + public static final String SERIALIZED_NAME_EMPLOYEE_LAST_NAME = "employeeLastName"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_LAST_NAME) + private String employeeLastName; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public W4FormMinimalRequest() { + } + + public W4FormMinimalRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type (always \"w4\" for this model). + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W4FormMinimalRequest email(String email) { + this.email = email; + return this; + } + + /** + * The email address of the individual associated with the form. + * @return email + */ + @javax.annotation.Nonnull + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public W4FormMinimalRequest employeeFirstName(String employeeFirstName) { + this.employeeFirstName = employeeFirstName; + return this; + } + + /** + * The first name of the employee. + * @return employeeFirstName + */ + @javax.annotation.Nonnull + public String getEmployeeFirstName() { + return employeeFirstName; + } + + public void setEmployeeFirstName(String employeeFirstName) { + this.employeeFirstName = employeeFirstName; + } + + + public W4FormMinimalRequest employeeLastName(String employeeLastName) { + this.employeeLastName = employeeLastName; + return this; + } + + /** + * The last name of the employee. + * @return employeeLastName + */ + @javax.annotation.Nonnull + public String getEmployeeLastName() { + return employeeLastName; + } + + public void setEmployeeLastName(String employeeLastName) { + this.employeeLastName = employeeLastName; + } + + + public W4FormMinimalRequest officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * The office code associated with the form. + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + + public W4FormMinimalRequest companyId(String companyId) { + this.companyId = companyId; + return this; + } + + /** + * The ID of the associated company. + * @return companyId + */ + @javax.annotation.Nonnull + public String getCompanyId() { + return companyId; + } + + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + + public W4FormMinimalRequest referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * A reference identifier for the form. + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W4FormMinimalRequest w4FormMinimalRequest = (W4FormMinimalRequest) o; + return Objects.equals(this.type, w4FormMinimalRequest.type) && + Objects.equals(this.email, w4FormMinimalRequest.email) && + Objects.equals(this.employeeFirstName, w4FormMinimalRequest.employeeFirstName) && + Objects.equals(this.employeeLastName, w4FormMinimalRequest.employeeLastName) && + Objects.equals(this.officeCode, w4FormMinimalRequest.officeCode) && + Objects.equals(this.companyId, w4FormMinimalRequest.companyId) && + Objects.equals(this.referenceId, w4FormMinimalRequest.referenceId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, email, employeeFirstName, employeeLastName, officeCode, companyId, referenceId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class W4FormMinimalRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" employeeFirstName: ").append(toIndentedString(employeeFirstName)).append("\n"); + sb.append(" employeeLastName: ").append(toIndentedString(employeeLastName)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("employeeFirstName"); + openapiRequiredFields.add("employeeLastName"); + openapiRequiredFields.add("companyId"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to W4FormMinimalRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W4FormMinimalRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W4FormMinimalRequest is not found in the empty JSON string", W4FormMinimalRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W4FormMinimalRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W4FormMinimalRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W4FormMinimalRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (!jsonObj.get("employeeFirstName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString())); + } + if (!jsonObj.get("employeeLastName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeLastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeLastName").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + if (!jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W4FormMinimalRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W4FormMinimalRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W4FormMinimalRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W4FormMinimalRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W4FormMinimalRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W4FormMinimalRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W4FormMinimalRequest + * @throws IOException if the JSON string is invalid with respect to W4FormMinimalRequest + */ + public static W4FormMinimalRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W4FormMinimalRequest.class); + } + + /** + * Convert an instance of W4FormMinimalRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java index 837f504..579a8ac 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java @@ -197,6 +197,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_OFFICE_CODE) private String officeCode; + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; @SerializedName(SERIALIZED_NAME_COMPANY_ID) private String companyId; @@ -209,14 +217,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - public W4FormRequest() { } @@ -599,6 +599,44 @@ public void setOfficeCode(String officeCode) { } + public W4FormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W4FormRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + public W4FormRequest companyId(String companyId) { this.companyId = companyId; return this; @@ -608,7 +646,7 @@ public W4FormRequest companyId(String companyId) { * The ID of the associated company. * @return companyId */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCompanyId() { return companyId; } @@ -656,44 +694,6 @@ public void setEmail(String email) { } - public W4FormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W4FormRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - @Override public boolean equals(Object o) { @@ -724,11 +724,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalWithheld, w4FormRequest.additionalWithheld) && Objects.equals(this.exemptFromWithholding, w4FormRequest.exemptFromWithholding) && Objects.equals(this.officeCode, w4FormRequest.officeCode) && + Objects.equals(this.eDeliveryConsentedAt, w4FormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w4FormRequest.signature) && Objects.equals(this.companyId, w4FormRequest.companyId) && Objects.equals(this.referenceId, w4FormRequest.referenceId) && - Objects.equals(this.email, w4FormRequest.email) && - Objects.equals(this.eDeliveryConsentedAt, w4FormRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w4FormRequest.signature); + Objects.equals(this.email, w4FormRequest.email); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -737,7 +737,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, tinType, tin, address, city, state, zip, maritalStatus, lastNameDiffers, numAllowances, otherDependents, nonJobIncome, deductions, additionalWithheld, exemptFromWithholding, officeCode, companyId, referenceId, email, eDeliveryConsentedAt, signature); + return Objects.hash(type, employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, tinType, tin, address, city, state, zip, maritalStatus, lastNameDiffers, numAllowances, otherDependents, nonJobIncome, deductions, additionalWithheld, exemptFromWithholding, officeCode, eDeliveryConsentedAt, signature, companyId, referenceId, email); } private static int hashCodeNullable(JsonNullable a) { @@ -771,11 +771,11 @@ public String toString() { sb.append(" additionalWithheld: ").append(toIndentedString(additionalWithheld)).append("\n"); sb.append(" exemptFromWithholding: ").append(toIndentedString(exemptFromWithholding)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -798,15 +798,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); openapiFields.add("type"); openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); - openapiFields.add("eDeliveryConsentedAt"); - openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("companyId"); } /** @@ -829,6 +830,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W4FormRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W4FormRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -873,7 +881,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); } - if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } + if (!jsonObj.get("companyId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { @@ -882,9 +893,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java index 17809db..767acf0 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.EntryStatusResponse; import Avalara.SDK.model.A1099.V2.W9FormBaseResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -597,12 +598,12 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("id"); openapiFields.add("entryStatus"); - openapiFields.add("entryStatusDate"); openapiFields.add("referenceId"); openapiFields.add("companyId"); openapiFields.add("displayName"); openapiFields.add("email"); openapiFields.add("archived"); + openapiFields.add("ancestorId"); openapiFields.add("signature"); openapiFields.add("signedDate"); openapiFields.add("eDeliveryConsentedAt"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java new file mode 100644 index 0000000..05ed60a --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java @@ -0,0 +1,438 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * W8BenEFormMinimalRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W8BenEFormMinimalRequest { + /** + * The form type (always \"w8bene\" for this model). + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private String referenceNumber; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public W8BenEFormMinimalRequest() { + } + + public W8BenEFormMinimalRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type (always \"w8bene\" for this model). + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W8BenEFormMinimalRequest email(String email) { + this.email = email; + return this; + } + + /** + * The email address of the individual associated with the form. + * @return email + */ + @javax.annotation.Nonnull + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public W8BenEFormMinimalRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the individual or entity associated with the form. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public W8BenEFormMinimalRequest referenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + /** + * A reference number for the form. + * @return referenceNumber + */ + @javax.annotation.Nullable + public String getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public W8BenEFormMinimalRequest companyId(String companyId) { + this.companyId = companyId; + return this; + } + + /** + * The ID of the associated company. + * @return companyId + */ + @javax.annotation.Nonnull + public String getCompanyId() { + return companyId; + } + + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + + public W8BenEFormMinimalRequest referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * A reference identifier for the form. + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W8BenEFormMinimalRequest w8BenEFormMinimalRequest = (W8BenEFormMinimalRequest) o; + return Objects.equals(this.type, w8BenEFormMinimalRequest.type) && + Objects.equals(this.email, w8BenEFormMinimalRequest.email) && + Objects.equals(this.name, w8BenEFormMinimalRequest.name) && + Objects.equals(this.referenceNumber, w8BenEFormMinimalRequest.referenceNumber) && + Objects.equals(this.companyId, w8BenEFormMinimalRequest.companyId) && + Objects.equals(this.referenceId, w8BenEFormMinimalRequest.referenceId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, email, name, referenceNumber, companyId, referenceId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class W8BenEFormMinimalRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("companyId"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to W8BenEFormMinimalRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W8BenEFormMinimalRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W8BenEFormMinimalRequest is not found in the empty JSON string", W8BenEFormMinimalRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W8BenEFormMinimalRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8BenEFormMinimalRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W8BenEFormMinimalRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); + } + if (!jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W8BenEFormMinimalRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W8BenEFormMinimalRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W8BenEFormMinimalRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W8BenEFormMinimalRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W8BenEFormMinimalRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W8BenEFormMinimalRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W8BenEFormMinimalRequest + * @throws IOException if the JSON string is invalid with respect to W8BenEFormMinimalRequest + */ + public static W8BenEFormMinimalRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W8BenEFormMinimalRequest.class); + } + + /** + * Convert an instance of W8BenEFormMinimalRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java index e715f42..fd7982f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java @@ -505,6 +505,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_CAPACITY_TO_SIGN_CERTIFICATION) private Boolean capacityToSignCertification; + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; @SerializedName(SERIALIZED_NAME_COMPANY_ID) private String companyId; @@ -517,14 +525,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - public W8BenEFormRequest() { } @@ -2359,6 +2359,44 @@ public void setCapacityToSignCertification(Boolean capacityToSignCertification) } + public W8BenEFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W8BenEFormRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + public W8BenEFormRequest companyId(String companyId) { this.companyId = companyId; return this; @@ -2368,7 +2406,7 @@ public W8BenEFormRequest companyId(String companyId) { * The ID of the associated company. * @return companyId */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCompanyId() { return companyId; } @@ -2416,44 +2454,6 @@ public void setEmail(String email) { } - public W8BenEFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W8BenEFormRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - @Override public boolean equals(Object o) { @@ -2560,11 +2560,11 @@ public boolean equals(Object o) { Objects.equals(this.substantialUsOwners, w8BenEFormRequest.substantialUsOwners) && Objects.equals(this.signerName, w8BenEFormRequest.signerName) && Objects.equals(this.capacityToSignCertification, w8BenEFormRequest.capacityToSignCertification) && + Objects.equals(this.eDeliveryConsentedAt, w8BenEFormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w8BenEFormRequest.signature) && Objects.equals(this.companyId, w8BenEFormRequest.companyId) && Objects.equals(this.referenceId, w8BenEFormRequest.referenceId) && - Objects.equals(this.email, w8BenEFormRequest.email) && - Objects.equals(this.eDeliveryConsentedAt, w8BenEFormRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w8BenEFormRequest.signature); + Objects.equals(this.email, w8BenEFormRequest.email); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -2573,7 +2573,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, name, citizenshipCountry, disregardedEntity, entityType, makingTreatyClaim, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tin, giin, foreignTinNotRequired, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, treatyCountryCertification, treatyCountry, benefitLimitationCertification, benefitLimitation, qualifiedResidentStatusCertification, treatyArticle, withholdingRate, incomeType, treatyReasons, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, ownerDocumentedFfiTrustBeneficiariesCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, nonCommercialFinancialActivityCertification, internationOrganizationCertification, intergovernmentalOrganizationCertification, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exemptBeneficialOwnerOwnedInvestmentEntityCertification, territoryFinancialInstitutionCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, section501COrganizationCertification, determinationLetterDate, nonprofitOrganizationCertification, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, passiveNffeNoSubstantialUsOwnersCertification, passiveNffeSubstantialUsOwnersProvidedCertification, exceptedInterAffiliateFfiCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, substantialUsOwners, signerName, capacityToSignCertification, companyId, referenceId, email, eDeliveryConsentedAt, signature); + return Objects.hash(type, name, citizenshipCountry, disregardedEntity, entityType, makingTreatyClaim, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tin, giin, foreignTinNotRequired, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, treatyCountryCertification, treatyCountry, benefitLimitationCertification, benefitLimitation, qualifiedResidentStatusCertification, treatyArticle, withholdingRate, incomeType, treatyReasons, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, ownerDocumentedFfiTrustBeneficiariesCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, nonCommercialFinancialActivityCertification, internationOrganizationCertification, intergovernmentalOrganizationCertification, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exemptBeneficialOwnerOwnedInvestmentEntityCertification, territoryFinancialInstitutionCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, section501COrganizationCertification, determinationLetterDate, nonprofitOrganizationCertification, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, passiveNffeNoSubstantialUsOwnersCertification, passiveNffeSubstantialUsOwnersProvidedCertification, exceptedInterAffiliateFfiCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, substantialUsOwners, signerName, capacityToSignCertification, eDeliveryConsentedAt, signature, companyId, referenceId, email); } private static int hashCodeNullable(JsonNullable a) { @@ -2683,11 +2683,11 @@ public String toString() { sb.append(" substantialUsOwners: ").append(toIndentedString(substantialUsOwners)).append("\n"); sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n"); sb.append(" capacityToSignCertification: ").append(toIndentedString(capacityToSignCertification)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -2710,15 +2710,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); openapiFields.add("type"); openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); - openapiFields.add("eDeliveryConsentedAt"); - openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("companyId"); } /** @@ -2741,6 +2742,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8BenEFormRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W8BenEFormRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -2892,7 +2900,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString())); } - if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } + if (!jsonObj.get("companyId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { @@ -2901,9 +2912,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java index c83177b..da2d884 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.EntryStatusResponse; import Avalara.SDK.model.A1099.V2.SubstantialUsOwnerResponse; import Avalara.SDK.model.A1099.V2.W9FormBaseResponse; import com.google.gson.TypeAdapter; @@ -2534,12 +2535,12 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("id"); openapiFields.add("entryStatus"); - openapiFields.add("entryStatusDate"); openapiFields.add("referenceId"); openapiFields.add("companyId"); openapiFields.add("displayName"); openapiFields.add("email"); openapiFields.add("archived"); + openapiFields.add("ancestorId"); openapiFields.add("signature"); openapiFields.add("signedDate"); openapiFields.add("eDeliveryConsentedAt"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java new file mode 100644 index 0000000..fc4028a --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java @@ -0,0 +1,438 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * W8BenFormMinimalRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W8BenFormMinimalRequest { + /** + * The form type (always \"w8ben\" for this model). + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private String referenceNumber; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public W8BenFormMinimalRequest() { + } + + public W8BenFormMinimalRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type (always \"w8ben\" for this model). + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W8BenFormMinimalRequest email(String email) { + this.email = email; + return this; + } + + /** + * The email address of the individual associated with the form. + * @return email + */ + @javax.annotation.Nonnull + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public W8BenFormMinimalRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the individual or entity associated with the form. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public W8BenFormMinimalRequest referenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + /** + * A reference number for the form. + * @return referenceNumber + */ + @javax.annotation.Nullable + public String getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public W8BenFormMinimalRequest companyId(String companyId) { + this.companyId = companyId; + return this; + } + + /** + * The ID of the associated company. + * @return companyId + */ + @javax.annotation.Nonnull + public String getCompanyId() { + return companyId; + } + + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + + public W8BenFormMinimalRequest referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * A reference identifier for the form. + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W8BenFormMinimalRequest w8BenFormMinimalRequest = (W8BenFormMinimalRequest) o; + return Objects.equals(this.type, w8BenFormMinimalRequest.type) && + Objects.equals(this.email, w8BenFormMinimalRequest.email) && + Objects.equals(this.name, w8BenFormMinimalRequest.name) && + Objects.equals(this.referenceNumber, w8BenFormMinimalRequest.referenceNumber) && + Objects.equals(this.companyId, w8BenFormMinimalRequest.companyId) && + Objects.equals(this.referenceId, w8BenFormMinimalRequest.referenceId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, email, name, referenceNumber, companyId, referenceId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class W8BenFormMinimalRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("companyId"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to W8BenFormMinimalRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W8BenFormMinimalRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W8BenFormMinimalRequest is not found in the empty JSON string", W8BenFormMinimalRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W8BenFormMinimalRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8BenFormMinimalRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W8BenFormMinimalRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); + } + if (!jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W8BenFormMinimalRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W8BenFormMinimalRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W8BenFormMinimalRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W8BenFormMinimalRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W8BenFormMinimalRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W8BenFormMinimalRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W8BenFormMinimalRequest + * @throws IOException if the JSON string is invalid with respect to W8BenFormMinimalRequest + */ + public static W8BenFormMinimalRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W8BenFormMinimalRequest.class); + } + + /** + * Convert an instance of W8BenFormMinimalRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java index fed26d9..e9a1a22 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java @@ -218,6 +218,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SIGNER_NAME) private String signerName; + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; @SerializedName(SERIALIZED_NAME_COMPANY_ID) private String companyId; @@ -230,14 +238,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - public W8BenFormRequest() { } @@ -715,6 +715,44 @@ public void setSignerName(String signerName) { } + public W8BenFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W8BenFormRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + public W8BenFormRequest companyId(String companyId) { this.companyId = companyId; return this; @@ -724,7 +762,7 @@ public W8BenFormRequest companyId(String companyId) { * The ID of the associated company. * @return companyId */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCompanyId() { return companyId; } @@ -772,44 +810,6 @@ public void setEmail(String email) { } - public W8BenFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W8BenFormRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - @Override public boolean equals(Object o) { @@ -845,11 +845,11 @@ public boolean equals(Object o) { Objects.equals(this.withholdingRate, w8BenFormRequest.withholdingRate) && Objects.equals(this.incomeType, w8BenFormRequest.incomeType) && Objects.equals(this.signerName, w8BenFormRequest.signerName) && + Objects.equals(this.eDeliveryConsentedAt, w8BenFormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w8BenFormRequest.signature) && Objects.equals(this.companyId, w8BenFormRequest.companyId) && Objects.equals(this.referenceId, w8BenFormRequest.referenceId) && - Objects.equals(this.email, w8BenFormRequest.email) && - Objects.equals(this.eDeliveryConsentedAt, w8BenFormRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w8BenFormRequest.signature); + Objects.equals(this.email, w8BenFormRequest.email); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -858,7 +858,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, name, citizenshipCountry, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tin, foreignTinNotRequired, foreignTin, referenceNumber, birthday, treatyCountry, treatyArticle, treatyReasons, withholdingRate, incomeType, signerName, companyId, referenceId, email, eDeliveryConsentedAt, signature); + return Objects.hash(type, name, citizenshipCountry, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tin, foreignTinNotRequired, foreignTin, referenceNumber, birthday, treatyCountry, treatyArticle, treatyReasons, withholdingRate, incomeType, signerName, eDeliveryConsentedAt, signature, companyId, referenceId, email); } private static int hashCodeNullable(JsonNullable a) { @@ -897,11 +897,11 @@ public String toString() { sb.append(" withholdingRate: ").append(toIndentedString(withholdingRate)).append("\n"); sb.append(" incomeType: ").append(toIndentedString(incomeType)).append("\n"); sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -924,15 +924,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); openapiFields.add("type"); openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); - openapiFields.add("eDeliveryConsentedAt"); - openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("companyId"); } /** @@ -955,6 +956,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8BenFormRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W8BenFormRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -1026,7 +1034,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString())); } - if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } + if (!jsonObj.get("companyId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { @@ -1035,9 +1046,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java index c54688d..85fa345 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.EntryStatusResponse; import Avalara.SDK.model.A1099.V2.W9FormBaseResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -773,12 +774,12 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("id"); openapiFields.add("entryStatus"); - openapiFields.add("entryStatusDate"); openapiFields.add("referenceId"); openapiFields.add("companyId"); openapiFields.add("displayName"); openapiFields.add("email"); openapiFields.add("archived"); + openapiFields.add("ancestorId"); openapiFields.add("signature"); openapiFields.add("signedDate"); openapiFields.add("eDeliveryConsentedAt"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java new file mode 100644 index 0000000..3d117a1 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java @@ -0,0 +1,438 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * W8ImyFormMinimalRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W8ImyFormMinimalRequest { + /** + * The form type (always \"w8imy\" for this model). + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private String referenceNumber; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public W8ImyFormMinimalRequest() { + } + + public W8ImyFormMinimalRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type (always \"w8imy\" for this model). + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W8ImyFormMinimalRequest email(String email) { + this.email = email; + return this; + } + + /** + * The email address of the individual associated with the form. + * @return email + */ + @javax.annotation.Nonnull + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public W8ImyFormMinimalRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the individual or entity associated with the form. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public W8ImyFormMinimalRequest referenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + /** + * A reference number for the form. + * @return referenceNumber + */ + @javax.annotation.Nullable + public String getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public W8ImyFormMinimalRequest companyId(String companyId) { + this.companyId = companyId; + return this; + } + + /** + * The ID of the associated company. + * @return companyId + */ + @javax.annotation.Nonnull + public String getCompanyId() { + return companyId; + } + + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + + public W8ImyFormMinimalRequest referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * A reference identifier for the form. + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W8ImyFormMinimalRequest w8ImyFormMinimalRequest = (W8ImyFormMinimalRequest) o; + return Objects.equals(this.type, w8ImyFormMinimalRequest.type) && + Objects.equals(this.email, w8ImyFormMinimalRequest.email) && + Objects.equals(this.name, w8ImyFormMinimalRequest.name) && + Objects.equals(this.referenceNumber, w8ImyFormMinimalRequest.referenceNumber) && + Objects.equals(this.companyId, w8ImyFormMinimalRequest.companyId) && + Objects.equals(this.referenceId, w8ImyFormMinimalRequest.referenceId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, email, name, referenceNumber, companyId, referenceId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class W8ImyFormMinimalRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("companyId"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to W8ImyFormMinimalRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W8ImyFormMinimalRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W8ImyFormMinimalRequest is not found in the empty JSON string", W8ImyFormMinimalRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W8ImyFormMinimalRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8ImyFormMinimalRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W8ImyFormMinimalRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); + } + if (!jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W8ImyFormMinimalRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W8ImyFormMinimalRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W8ImyFormMinimalRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W8ImyFormMinimalRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W8ImyFormMinimalRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W8ImyFormMinimalRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W8ImyFormMinimalRequest + * @throws IOException if the JSON string is invalid with respect to W8ImyFormMinimalRequest + */ + public static W8ImyFormMinimalRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W8ImyFormMinimalRequest.class); + } + + /** + * Convert an instance of W8ImyFormMinimalRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java index d8f3442..8ef761e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java @@ -566,6 +566,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SIGNER_NAME) private String signerName; + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; @SerializedName(SERIALIZED_NAME_COMPANY_ID) private String companyId; @@ -578,14 +586,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - public W8ImyFormRequest() { } @@ -2716,6 +2716,44 @@ public void setSignerName(String signerName) { } + public W8ImyFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W8ImyFormRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + public W8ImyFormRequest companyId(String companyId) { this.companyId = companyId; return this; @@ -2725,7 +2763,7 @@ public W8ImyFormRequest companyId(String companyId) { * The ID of the associated company. * @return companyId */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCompanyId() { return companyId; } @@ -2773,44 +2811,6 @@ public void setEmail(String email) { } - public W8ImyFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W8ImyFormRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - @Override public boolean equals(Object o) { @@ -2933,11 +2933,11 @@ public boolean equals(Object o) { Objects.equals(this.sponsoredDirectReportingNffeCertification, w8ImyFormRequest.sponsoredDirectReportingNffeCertification) && Objects.equals(this.directReportingNffeSponsoringEntity, w8ImyFormRequest.directReportingNffeSponsoringEntity) && Objects.equals(this.signerName, w8ImyFormRequest.signerName) && + Objects.equals(this.eDeliveryConsentedAt, w8ImyFormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w8ImyFormRequest.signature) && Objects.equals(this.companyId, w8ImyFormRequest.companyId) && Objects.equals(this.referenceId, w8ImyFormRequest.referenceId) && - Objects.equals(this.email, w8ImyFormRequest.email) && - Objects.equals(this.eDeliveryConsentedAt, w8ImyFormRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w8ImyFormRequest.signature); + Objects.equals(this.email, w8ImyFormRequest.email); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -2946,7 +2946,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, name, citizenshipCountry, disregardedEntity, entityType, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, qualifiedIntermediaryCertification, qiPrimaryWithholdingResponsibilityCertification, qiWithholdingResponsibilityForPtpSalesCertification, qiNomineeWithholdingResponsibilityForPtpDistributionsCertification, qiSecuritiesLenderSubstituteDividendWithholdingCertification, qiWithholdingAnd1099ReportingResponsibilityCertification, qiForm1099OrFatcaReportingResponsibilityCertification, qiOptOutOfForm1099ReportingCertification, qiWithholdingRatePoolCertification, qiIntermediaryOrFlowThroughEntityDocumentationCertification, qualifiedDerivativesDealerCertification, qddCorporation, qddPartnership, qddDisregardedEntity, nonqualifiedIntermediaryCertification, nqiWithholdingStatementTransmissionCertification, nqiWithholdingRatePoolComplianceCertification, nqiQualifiedSecuritiesLenderCertification, nqiAlternativeWithholdingStatementVerificationCertification, territoryFinancialInstitutionCertification, tfiTreatedAsUsPersonCertification, tfiWithholdingStatementTransmissionCertification, tfiTreatedAsUsPersonForPtpSalesCertification, tfiNomineeUsPersonForPtpDistributionsCertification, tfiNotNomineeForPtpDistributionsCertification, usBranchNonEffectivelyConnectedIncomeCertification, usBranchAgreementToBeTreatedAsUsPersonCertification, usBranchWithholdingStatementAndComplianceCertification, usBranchActingAsUsPersonForPtpSalesCertification, usBranchNomineeForPtpDistributionsCertification, usBranchNotNomineeForPtpDistributionsCertification, withholdingForeignPartnershipOrTrustCertification, nonwithholdingForeignEntityWithholdingStatementCertification, foreignEntityPartnerInLowerTierPartnershipCertification, foreignPartnershipAmountRealizedSection1446FCertification, foreignPartnershipModifiedAmountRealizedCertification, foreignGrantorTrustAmountRealizedAllocationCertification, alternativeWithholdingStatementRelianceCertification, npFfiWithExemptBeneficialOwnersCertification, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, foreignCentralBankOfIssueCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, signerName, companyId, referenceId, email, eDeliveryConsentedAt, signature); + return Objects.hash(type, name, citizenshipCountry, disregardedEntity, entityType, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, qualifiedIntermediaryCertification, qiPrimaryWithholdingResponsibilityCertification, qiWithholdingResponsibilityForPtpSalesCertification, qiNomineeWithholdingResponsibilityForPtpDistributionsCertification, qiSecuritiesLenderSubstituteDividendWithholdingCertification, qiWithholdingAnd1099ReportingResponsibilityCertification, qiForm1099OrFatcaReportingResponsibilityCertification, qiOptOutOfForm1099ReportingCertification, qiWithholdingRatePoolCertification, qiIntermediaryOrFlowThroughEntityDocumentationCertification, qualifiedDerivativesDealerCertification, qddCorporation, qddPartnership, qddDisregardedEntity, nonqualifiedIntermediaryCertification, nqiWithholdingStatementTransmissionCertification, nqiWithholdingRatePoolComplianceCertification, nqiQualifiedSecuritiesLenderCertification, nqiAlternativeWithholdingStatementVerificationCertification, territoryFinancialInstitutionCertification, tfiTreatedAsUsPersonCertification, tfiWithholdingStatementTransmissionCertification, tfiTreatedAsUsPersonForPtpSalesCertification, tfiNomineeUsPersonForPtpDistributionsCertification, tfiNotNomineeForPtpDistributionsCertification, usBranchNonEffectivelyConnectedIncomeCertification, usBranchAgreementToBeTreatedAsUsPersonCertification, usBranchWithholdingStatementAndComplianceCertification, usBranchActingAsUsPersonForPtpSalesCertification, usBranchNomineeForPtpDistributionsCertification, usBranchNotNomineeForPtpDistributionsCertification, withholdingForeignPartnershipOrTrustCertification, nonwithholdingForeignEntityWithholdingStatementCertification, foreignEntityPartnerInLowerTierPartnershipCertification, foreignPartnershipAmountRealizedSection1446FCertification, foreignPartnershipModifiedAmountRealizedCertification, foreignGrantorTrustAmountRealizedAllocationCertification, alternativeWithholdingStatementRelianceCertification, npFfiWithExemptBeneficialOwnersCertification, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, foreignCentralBankOfIssueCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, signerName, eDeliveryConsentedAt, signature, companyId, referenceId, email); } private static int hashCodeNullable(JsonNullable a) { @@ -3072,11 +3072,11 @@ public String toString() { sb.append(" sponsoredDirectReportingNffeCertification: ").append(toIndentedString(sponsoredDirectReportingNffeCertification)).append("\n"); sb.append(" directReportingNffeSponsoringEntity: ").append(toIndentedString(directReportingNffeSponsoringEntity)).append("\n"); sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -3099,15 +3099,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); openapiFields.add("type"); openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); - openapiFields.add("eDeliveryConsentedAt"); - openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("companyId"); } /** @@ -3130,6 +3131,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8ImyFormRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W8ImyFormRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -3252,7 +3260,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString())); } - if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } + if (!jsonObj.get("companyId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { @@ -3261,9 +3272,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java index efa45c5..392d96f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.EntryStatusResponse; import Avalara.SDK.model.A1099.V2.W9FormBaseResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -2898,12 +2899,12 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("id"); openapiFields.add("entryStatus"); - openapiFields.add("entryStatusDate"); openapiFields.add("referenceId"); openapiFields.add("companyId"); openapiFields.add("displayName"); openapiFields.add("email"); openapiFields.add("archived"); + openapiFields.add("ancestorId"); openapiFields.add("signature"); openapiFields.add("signedDate"); openapiFields.add("eDeliveryConsentedAt"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java new file mode 100644 index 0000000..9a24b6e --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java @@ -0,0 +1,380 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * W9FormBaseMinimalRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W9FormBaseMinimalRequest { + /** + * The form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public W9FormBaseMinimalRequest() { + } + + public W9FormBaseMinimalRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W9FormBaseMinimalRequest companyId(String companyId) { + this.companyId = companyId; + return this; + } + + /** + * The ID of the associated company. + * @return companyId + */ + @javax.annotation.Nonnull + public String getCompanyId() { + return companyId; + } + + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + + public W9FormBaseMinimalRequest referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * A reference identifier for the form. + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public W9FormBaseMinimalRequest email(String email) { + this.email = email; + return this; + } + + /** + * The email address of the individual associated with the form. + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W9FormBaseMinimalRequest w9FormBaseMinimalRequest = (W9FormBaseMinimalRequest) o; + return Objects.equals(this.type, w9FormBaseMinimalRequest.type) && + Objects.equals(this.companyId, w9FormBaseMinimalRequest.companyId) && + Objects.equals(this.referenceId, w9FormBaseMinimalRequest.referenceId) && + Objects.equals(this.email, w9FormBaseMinimalRequest.email); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, companyId, referenceId, email); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class W9FormBaseMinimalRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("companyId"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to W9FormBaseMinimalRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W9FormBaseMinimalRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W9FormBaseMinimalRequest is not found in the empty JSON string", W9FormBaseMinimalRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W9FormBaseMinimalRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormBaseMinimalRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W9FormBaseMinimalRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W9FormBaseMinimalRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W9FormBaseMinimalRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W9FormBaseMinimalRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W9FormBaseMinimalRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W9FormBaseMinimalRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W9FormBaseMinimalRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W9FormBaseMinimalRequest + * @throws IOException if the JSON string is invalid with respect to W9FormBaseMinimalRequest + */ + public static W9FormBaseMinimalRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W9FormBaseMinimalRequest.class); + } + + /** + * Convert an instance of W9FormBaseMinimalRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java index ec8d476..b45ffd7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java @@ -59,6 +59,14 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class W9FormBaseRequest { + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + /** * The form type. */ @@ -133,14 +141,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - public W9FormBaseRequest() { } @@ -151,6 +151,44 @@ public W9FormBaseRequest( this.type = type; } + public W9FormBaseRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W9FormBaseRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + /** * The form type. * @return type @@ -171,7 +209,7 @@ public W9FormBaseRequest companyId(String companyId) { * The ID of the associated company. * @return companyId */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCompanyId() { return companyId; } @@ -219,44 +257,6 @@ public void setEmail(String email) { } - public W9FormBaseRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W9FormBaseRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - @Override public boolean equals(Object o) { @@ -267,12 +267,12 @@ public boolean equals(Object o) { return false; } W9FormBaseRequest w9FormBaseRequest = (W9FormBaseRequest) o; - return Objects.equals(this.type, w9FormBaseRequest.type) && + return Objects.equals(this.eDeliveryConsentedAt, w9FormBaseRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w9FormBaseRequest.signature) && + Objects.equals(this.type, w9FormBaseRequest.type) && Objects.equals(this.companyId, w9FormBaseRequest.companyId) && Objects.equals(this.referenceId, w9FormBaseRequest.referenceId) && - Objects.equals(this.email, w9FormBaseRequest.email) && - Objects.equals(this.eDeliveryConsentedAt, w9FormBaseRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w9FormBaseRequest.signature); + Objects.equals(this.email, w9FormBaseRequest.email); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -281,7 +281,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, companyId, referenceId, email, eDeliveryConsentedAt, signature); + return Objects.hash(eDeliveryConsentedAt, signature, type, companyId, referenceId, email); } private static int hashCodeNullable(JsonNullable a) { @@ -295,12 +295,12 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class W9FormBaseRequest {\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -327,11 +327,10 @@ private String toIndentedString(Object o) { openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); - openapiFields.add("eDeliveryConsentedAt"); - openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("companyId"); } /** @@ -354,7 +353,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormBaseRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W9FormBaseRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -362,7 +371,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { TypeEnum.validateJsonElement(jsonObj.get("type")); } - if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + if (!jsonObj.get("companyId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { @@ -371,9 +380,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java index fecf3ed..e771063 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.EntryStatusResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -65,11 +66,7 @@ public class W9FormBaseResponse { public static final String SERIALIZED_NAME_ENTRY_STATUS = "entryStatus"; @SerializedName(SERIALIZED_NAME_ENTRY_STATUS) - private String entryStatus; - - public static final String SERIALIZED_NAME_ENTRY_STATUS_DATE = "entryStatusDate"; - @SerializedName(SERIALIZED_NAME_ENTRY_STATUS_DATE) - private OffsetDateTime entryStatusDate; + private EntryStatusResponse entryStatus; public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; @SerializedName(SERIALIZED_NAME_REFERENCE_ID) @@ -91,6 +88,10 @@ public class W9FormBaseResponse { @SerializedName(SERIALIZED_NAME_ARCHIVED) private Boolean archived; + public static final String SERIALIZED_NAME_ANCESTOR_ID = "ancestorId"; + @SerializedName(SERIALIZED_NAME_ANCESTOR_ID) + private String ancestorId; + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; @SerializedName(SERIALIZED_NAME_SIGNATURE) private String signature; @@ -138,44 +139,25 @@ public void setId(String id) { } - public W9FormBaseResponse entryStatus(String entryStatus) { + public W9FormBaseResponse entryStatus(EntryStatusResponse entryStatus) { this.entryStatus = entryStatus; return this; } /** - * The form status. + * The entry status information for the form. * @return entryStatus */ @javax.annotation.Nullable - public String getEntryStatus() { + public EntryStatusResponse getEntryStatus() { return entryStatus; } - public void setEntryStatus(String entryStatus) { + public void setEntryStatus(EntryStatusResponse entryStatus) { this.entryStatus = entryStatus; } - public W9FormBaseResponse entryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - return this; - } - - /** - * The timestamp for the latest status update. - * @return entryStatusDate - */ - @javax.annotation.Nullable - public OffsetDateTime getEntryStatusDate() { - return entryStatusDate; - } - - public void setEntryStatusDate(OffsetDateTime entryStatusDate) { - this.entryStatusDate = entryStatusDate; - } - - public W9FormBaseResponse referenceId(String referenceId) { this.referenceId = referenceId; return this; @@ -271,6 +253,25 @@ public void setArchived(Boolean archived) { } + public W9FormBaseResponse ancestorId(String ancestorId) { + this.ancestorId = ancestorId; + return this; + } + + /** + * Form ID of previous version. + * @return ancestorId + */ + @javax.annotation.Nullable + public String getAncestorId() { + return ancestorId; + } + + public void setAncestorId(String ancestorId) { + this.ancestorId = ancestorId; + } + + public W9FormBaseResponse signature(String signature) { this.signature = signature; return this; @@ -397,12 +398,12 @@ public boolean equals(Object o) { W9FormBaseResponse w9FormBaseResponse = (W9FormBaseResponse) o; return Objects.equals(this.id, w9FormBaseResponse.id) && Objects.equals(this.entryStatus, w9FormBaseResponse.entryStatus) && - Objects.equals(this.entryStatusDate, w9FormBaseResponse.entryStatusDate) && Objects.equals(this.referenceId, w9FormBaseResponse.referenceId) && Objects.equals(this.companyId, w9FormBaseResponse.companyId) && Objects.equals(this.displayName, w9FormBaseResponse.displayName) && Objects.equals(this.email, w9FormBaseResponse.email) && Objects.equals(this.archived, w9FormBaseResponse.archived) && + Objects.equals(this.ancestorId, w9FormBaseResponse.ancestorId) && Objects.equals(this.signature, w9FormBaseResponse.signature) && Objects.equals(this.signedDate, w9FormBaseResponse.signedDate) && Objects.equals(this.eDeliveryConsentedAt, w9FormBaseResponse.eDeliveryConsentedAt) && @@ -417,7 +418,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, entryStatus, entryStatusDate, referenceId, companyId, displayName, email, archived, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt, type); + return Objects.hash(id, entryStatus, referenceId, companyId, displayName, email, archived, ancestorId, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt, type); } private static int hashCodeNullable(JsonNullable a) { @@ -433,12 +434,12 @@ public String toString() { sb.append("class W9FormBaseResponse {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" entryStatus: ").append(toIndentedString(entryStatus)).append("\n"); - sb.append(" entryStatusDate: ").append(toIndentedString(entryStatusDate)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); + sb.append(" ancestorId: ").append(toIndentedString(ancestorId)).append("\n"); sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" signedDate: ").append(toIndentedString(signedDate)).append("\n"); sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java new file mode 100644 index 0000000..2a5ae9c --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java @@ -0,0 +1,438 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * W9FormMinimalRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W9FormMinimalRequest { + /** + * The form type (always \"w9\" for this model). + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public W9FormMinimalRequest() { + } + + public W9FormMinimalRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type (always \"w9\" for this model). + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W9FormMinimalRequest email(String email) { + this.email = email; + return this; + } + + /** + * The email address of the individual associated with the form. + * @return email + */ + @javax.annotation.Nonnull + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public W9FormMinimalRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the individual or entity associated with the form. + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public W9FormMinimalRequest accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * The account number associated with the form. + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public W9FormMinimalRequest companyId(String companyId) { + this.companyId = companyId; + return this; + } + + /** + * The ID of the associated company. + * @return companyId + */ + @javax.annotation.Nonnull + public String getCompanyId() { + return companyId; + } + + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + + + public W9FormMinimalRequest referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * A reference identifier for the form. + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W9FormMinimalRequest w9FormMinimalRequest = (W9FormMinimalRequest) o; + return Objects.equals(this.type, w9FormMinimalRequest.type) && + Objects.equals(this.email, w9FormMinimalRequest.email) && + Objects.equals(this.name, w9FormMinimalRequest.name) && + Objects.equals(this.accountNumber, w9FormMinimalRequest.accountNumber) && + Objects.equals(this.companyId, w9FormMinimalRequest.companyId) && + Objects.equals(this.referenceId, w9FormMinimalRequest.referenceId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, email, name, accountNumber, companyId, referenceId); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class W9FormMinimalRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("companyId"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to W9FormMinimalRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W9FormMinimalRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W9FormMinimalRequest is not found in the empty JSON string", W9FormMinimalRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W9FormMinimalRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormMinimalRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W9FormMinimalRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if (!jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W9FormMinimalRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W9FormMinimalRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W9FormMinimalRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W9FormMinimalRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W9FormMinimalRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W9FormMinimalRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W9FormMinimalRequest + * @throws IOException if the JSON string is invalid with respect to W9FormMinimalRequest + */ + public static W9FormMinimalRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W9FormMinimalRequest.class); + } + + /** + * Convert an instance of W9FormMinimalRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java index a065787..5b6c274 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java @@ -193,6 +193,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_IS1099ABLE) private Boolean is1099able; + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; @SerializedName(SERIALIZED_NAME_COMPANY_ID) private String companyId; @@ -205,14 +213,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - public W9FormRequest() { } @@ -576,6 +576,44 @@ public void setIs1099able(Boolean is1099able) { } + public W9FormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W9FormRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + public W9FormRequest companyId(String companyId) { this.companyId = companyId; return this; @@ -585,7 +623,7 @@ public W9FormRequest companyId(String companyId) { * The ID of the associated company. * @return companyId */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCompanyId() { return companyId; } @@ -633,44 +671,6 @@ public void setEmail(String email) { } - public W9FormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W9FormRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - @Override public boolean equals(Object o) { @@ -700,11 +700,11 @@ public boolean equals(Object o) { Objects.equals(this.tin, w9FormRequest.tin) && Objects.equals(this.backupWithholding, w9FormRequest.backupWithholding) && Objects.equals(this.is1099able, w9FormRequest.is1099able) && + Objects.equals(this.eDeliveryConsentedAt, w9FormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w9FormRequest.signature) && Objects.equals(this.companyId, w9FormRequest.companyId) && Objects.equals(this.referenceId, w9FormRequest.referenceId) && - Objects.equals(this.email, w9FormRequest.email) && - Objects.equals(this.eDeliveryConsentedAt, w9FormRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w9FormRequest.signature); + Objects.equals(this.email, w9FormRequest.email); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -713,7 +713,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, name, businessName, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, companyId, referenceId, email, eDeliveryConsentedAt, signature); + return Objects.hash(type, name, businessName, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, eDeliveryConsentedAt, signature, companyId, referenceId, email); } private static int hashCodeNullable(JsonNullable a) { @@ -746,11 +746,11 @@ public String toString() { sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); sb.append(" backupWithholding: ").append(toIndentedString(backupWithholding)).append("\n"); sb.append(" is1099able: ").append(toIndentedString(is1099able)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -773,15 +773,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); openapiFields.add("type"); openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); - openapiFields.add("eDeliveryConsentedAt"); - openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("companyId"); } /** @@ -804,6 +805,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : W9FormRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); @@ -854,7 +862,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); } - if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } + if (!jsonObj.get("companyId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); } if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { @@ -863,9 +874,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java index 5f090fa..5798a81 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.EntryStatusResponse; import Avalara.SDK.model.A1099.V2.TinMatchStatusResponse; import Avalara.SDK.model.A1099.V2.W9FormBaseResponse; import com.google.gson.TypeAdapter; @@ -598,12 +599,12 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("id"); openapiFields.add("entryStatus"); - openapiFields.add("entryStatusDate"); openapiFields.add("referenceId"); openapiFields.add("companyId"); openapiFields.add("displayName"); openapiFields.add("email"); openapiFields.add("archived"); + openapiFields.add("ancestorId"); openapiFields.add("signature"); openapiFields.add("signedDate"); openapiFields.add("eDeliveryConsentedAt"); diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponse.java deleted file mode 100644 index 8f3f55f..0000000 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponse.java +++ /dev/null @@ -1,289 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.EInvoicing.V1; - -import java.util.Objects; -import Avalara.SDK.model.EInvoicing.V1.DirectorySearchResponseValueInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * Response schema for directory search results - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class DirectorySearchResponse { - public static final String SERIALIZED_NAME_AT_RECORD_SET_COUNT = "@recordSetCount"; - @SerializedName(SERIALIZED_NAME_AT_RECORD_SET_COUNT) - private Integer atRecordSetCount; - - public static final String SERIALIZED_NAME_AT_NEXT_LINK = "@nextLink"; - @SerializedName(SERIALIZED_NAME_AT_NEXT_LINK) - private String atNextLink; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private List value = new ArrayList<>(); - - public DirectorySearchResponse() { - } - - public DirectorySearchResponse atRecordSetCount(Integer atRecordSetCount) { - this.atRecordSetCount = atRecordSetCount; - return this; - } - - /** - * The count of records in the result set - * @return atRecordSetCount - */ - @javax.annotation.Nullable - public Integer getAtRecordSetCount() { - return atRecordSetCount; - } - - public void setAtRecordSetCount(Integer atRecordSetCount) { - this.atRecordSetCount = atRecordSetCount; - } - - - public DirectorySearchResponse atNextLink(String atNextLink) { - this.atNextLink = atNextLink; - return this; - } - - /** - * The next page link to get the next set of results. - * @return atNextLink - */ - @javax.annotation.Nullable - public String getAtNextLink() { - return atNextLink; - } - - public void setAtNextLink(String atNextLink) { - this.atNextLink = atNextLink; - } - - - public DirectorySearchResponse value(List value) { - this.value = value; - return this; - } - - public DirectorySearchResponse addValueItem(DirectorySearchResponseValueInner valueItem) { - if (this.value == null) { - this.value = new ArrayList<>(); - } - this.value.add(valueItem); - return this; - } - - /** - * Get value - * @return value - */ - @javax.annotation.Nullable - public List getValue() { - return value; - } - - public void setValue(List value) { - this.value = value; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DirectorySearchResponse directorySearchResponse = (DirectorySearchResponse) o; - return Objects.equals(this.atRecordSetCount, directorySearchResponse.atRecordSetCount) && - Objects.equals(this.atNextLink, directorySearchResponse.atNextLink) && - Objects.equals(this.value, directorySearchResponse.value); - } - - @Override - public int hashCode() { - return Objects.hash(atRecordSetCount, atNextLink, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DirectorySearchResponse {\n"); - sb.append(" atRecordSetCount: ").append(toIndentedString(atRecordSetCount)).append("\n"); - sb.append(" atNextLink: ").append(toIndentedString(atNextLink)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("@recordSetCount"); - openapiFields.add("@nextLink"); - openapiFields.add("value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DirectorySearchResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DirectorySearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DirectorySearchResponse is not found in the empty JSON string", DirectorySearchResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DirectorySearchResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DirectorySearchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("@nextLink") != null && !jsonObj.get("@nextLink").isJsonNull()) && !jsonObj.get("@nextLink").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `@nextLink` to be a primitive type in the JSON string but got `%s`", jsonObj.get("@nextLink").toString())); - } - if (jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) { - JsonArray jsonArrayvalue = jsonObj.getAsJsonArray("value"); - if (jsonArrayvalue != null) { - // ensure the json data is an array - if (!jsonObj.get("value").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be an array in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - - // validate the optional field `value` (array) - for (int i = 0; i < jsonArrayvalue.size(); i++) { - DirectorySearchResponseValueInner.validateJsonElement(jsonArrayvalue.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DirectorySearchResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DirectorySearchResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DirectorySearchResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DirectorySearchResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DirectorySearchResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DirectorySearchResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DirectorySearchResponse - * @throws IOException if the JSON string is invalid with respect to DirectorySearchResponse - */ - public static DirectorySearchResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DirectorySearchResponse.class); - } - - /** - * Convert an instance of DirectorySearchResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInner.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInner.java deleted file mode 100644 index c1852b0..0000000 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInner.java +++ /dev/null @@ -1,446 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.EInvoicing.V1; - -import java.util.Objects; -import Avalara.SDK.model.EInvoicing.V1.DirectorySearchResponseValueInnerAddressesInner; -import Avalara.SDK.model.EInvoicing.V1.DirectorySearchResponseValueInnerIdentifiersInner; -import Avalara.SDK.model.EInvoicing.V1.DirectorySearchResponseValueInnerSupportedDocumentTypesInner; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * DirectorySearchResponseValueInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class DirectorySearchResponseValueInner { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_NETWORK = "network"; - @SerializedName(SERIALIZED_NAME_NETWORK) - private String network; - - public static final String SERIALIZED_NAME_REGISTRATION_DATE = "registrationDate"; - @SerializedName(SERIALIZED_NAME_REGISTRATION_DATE) - private LocalDate registrationDate; - - public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; - @SerializedName(SERIALIZED_NAME_IDENTIFIERS) - private List identifiers = new ArrayList<>(); - - public static final String SERIALIZED_NAME_ADDRESSES = "addresses"; - @SerializedName(SERIALIZED_NAME_ADDRESSES) - private List addresses = new ArrayList<>(); - - public static final String SERIALIZED_NAME_SUPPORTED_DOCUMENT_TYPES = "supportedDocumentTypes"; - @SerializedName(SERIALIZED_NAME_SUPPORTED_DOCUMENT_TYPES) - private List supportedDocumentTypes = new ArrayList<>(); - - public DirectorySearchResponseValueInner() { - } - - public DirectorySearchResponseValueInner id(String id) { - this.id = id; - return this; - } - - /** - * Avalara unique ID of the participant in the directory. - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public DirectorySearchResponseValueInner name(String name) { - this.name = name; - return this; - } - - /** - * Name of the participant (typically, the name of the business entity). - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public DirectorySearchResponseValueInner network(String network) { - this.network = network; - return this; - } - - /** - * The network where the participant is present. - * @return network - */ - @javax.annotation.Nullable - public String getNetwork() { - return network; - } - - public void setNetwork(String network) { - this.network = network; - } - - - public DirectorySearchResponseValueInner registrationDate(LocalDate registrationDate) { - this.registrationDate = registrationDate; - return this; - } - - /** - * Registration date of the participant if available - * @return registrationDate - */ - @javax.annotation.Nullable - public LocalDate getRegistrationDate() { - return registrationDate; - } - - public void setRegistrationDate(LocalDate registrationDate) { - this.registrationDate = registrationDate; - } - - - public DirectorySearchResponseValueInner identifiers(List identifiers) { - this.identifiers = identifiers; - return this; - } - - public DirectorySearchResponseValueInner addIdentifiersItem(DirectorySearchResponseValueInnerIdentifiersInner identifiersItem) { - if (this.identifiers == null) { - this.identifiers = new ArrayList<>(); - } - this.identifiers.add(identifiersItem); - return this; - } - - /** - * Get identifiers - * @return identifiers - */ - @javax.annotation.Nullable - public List getIdentifiers() { - return identifiers; - } - - public void setIdentifiers(List identifiers) { - this.identifiers = identifiers; - } - - - public DirectorySearchResponseValueInner addresses(List addresses) { - this.addresses = addresses; - return this; - } - - public DirectorySearchResponseValueInner addAddressesItem(DirectorySearchResponseValueInnerAddressesInner addressesItem) { - if (this.addresses == null) { - this.addresses = new ArrayList<>(); - } - this.addresses.add(addressesItem); - return this; - } - - /** - * Get addresses - * @return addresses - */ - @javax.annotation.Nullable - public List getAddresses() { - return addresses; - } - - public void setAddresses(List addresses) { - this.addresses = addresses; - } - - - public DirectorySearchResponseValueInner supportedDocumentTypes(List supportedDocumentTypes) { - this.supportedDocumentTypes = supportedDocumentTypes; - return this; - } - - public DirectorySearchResponseValueInner addSupportedDocumentTypesItem(DirectorySearchResponseValueInnerSupportedDocumentTypesInner supportedDocumentTypesItem) { - if (this.supportedDocumentTypes == null) { - this.supportedDocumentTypes = new ArrayList<>(); - } - this.supportedDocumentTypes.add(supportedDocumentTypesItem); - return this; - } - - /** - * Get supportedDocumentTypes - * @return supportedDocumentTypes - */ - @javax.annotation.Nullable - public List getSupportedDocumentTypes() { - return supportedDocumentTypes; - } - - public void setSupportedDocumentTypes(List supportedDocumentTypes) { - this.supportedDocumentTypes = supportedDocumentTypes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DirectorySearchResponseValueInner directorySearchResponseValueInner = (DirectorySearchResponseValueInner) o; - return Objects.equals(this.id, directorySearchResponseValueInner.id) && - Objects.equals(this.name, directorySearchResponseValueInner.name) && - Objects.equals(this.network, directorySearchResponseValueInner.network) && - Objects.equals(this.registrationDate, directorySearchResponseValueInner.registrationDate) && - Objects.equals(this.identifiers, directorySearchResponseValueInner.identifiers) && - Objects.equals(this.addresses, directorySearchResponseValueInner.addresses) && - Objects.equals(this.supportedDocumentTypes, directorySearchResponseValueInner.supportedDocumentTypes); - } - - @Override - public int hashCode() { - return Objects.hash(id, name, network, registrationDate, identifiers, addresses, supportedDocumentTypes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DirectorySearchResponseValueInner {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" registrationDate: ").append(toIndentedString(registrationDate)).append("\n"); - sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); - sb.append(" addresses: ").append(toIndentedString(addresses)).append("\n"); - sb.append(" supportedDocumentTypes: ").append(toIndentedString(supportedDocumentTypes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("network"); - openapiFields.add("registrationDate"); - openapiFields.add("identifiers"); - openapiFields.add("addresses"); - openapiFields.add("supportedDocumentTypes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DirectorySearchResponseValueInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DirectorySearchResponseValueInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DirectorySearchResponseValueInner is not found in the empty JSON string", DirectorySearchResponseValueInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DirectorySearchResponseValueInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DirectorySearchResponseValueInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("network") != null && !jsonObj.get("network").isJsonNull()) && !jsonObj.get("network").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `network` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network").toString())); - } - if (jsonObj.get("identifiers") != null && !jsonObj.get("identifiers").isJsonNull()) { - JsonArray jsonArrayidentifiers = jsonObj.getAsJsonArray("identifiers"); - if (jsonArrayidentifiers != null) { - // ensure the json data is an array - if (!jsonObj.get("identifiers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("identifiers").toString())); - } - - // validate the optional field `identifiers` (array) - for (int i = 0; i < jsonArrayidentifiers.size(); i++) { - DirectorySearchResponseValueInnerIdentifiersInner.validateJsonElement(jsonArrayidentifiers.get(i)); - }; - } - } - if (jsonObj.get("addresses") != null && !jsonObj.get("addresses").isJsonNull()) { - JsonArray jsonArrayaddresses = jsonObj.getAsJsonArray("addresses"); - if (jsonArrayaddresses != null) { - // ensure the json data is an array - if (!jsonObj.get("addresses").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `addresses` to be an array in the JSON string but got `%s`", jsonObj.get("addresses").toString())); - } - - // validate the optional field `addresses` (array) - for (int i = 0; i < jsonArrayaddresses.size(); i++) { - DirectorySearchResponseValueInnerAddressesInner.validateJsonElement(jsonArrayaddresses.get(i)); - }; - } - } - if (jsonObj.get("supportedDocumentTypes") != null && !jsonObj.get("supportedDocumentTypes").isJsonNull()) { - JsonArray jsonArraysupportedDocumentTypes = jsonObj.getAsJsonArray("supportedDocumentTypes"); - if (jsonArraysupportedDocumentTypes != null) { - // ensure the json data is an array - if (!jsonObj.get("supportedDocumentTypes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `supportedDocumentTypes` to be an array in the JSON string but got `%s`", jsonObj.get("supportedDocumentTypes").toString())); - } - - // validate the optional field `supportedDocumentTypes` (array) - for (int i = 0; i < jsonArraysupportedDocumentTypes.size(); i++) { - DirectorySearchResponseValueInnerSupportedDocumentTypesInner.validateJsonElement(jsonArraysupportedDocumentTypes.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DirectorySearchResponseValueInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DirectorySearchResponseValueInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DirectorySearchResponseValueInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DirectorySearchResponseValueInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DirectorySearchResponseValueInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DirectorySearchResponseValueInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of DirectorySearchResponseValueInner - * @throws IOException if the JSON string is invalid with respect to DirectorySearchResponseValueInner - */ - public static DirectorySearchResponseValueInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DirectorySearchResponseValueInner.class); - } - - /** - * Convert an instance of DirectorySearchResponseValueInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.java deleted file mode 100644 index 397433c..0000000 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.EInvoicing.V1; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * DirectorySearchResponseValueInnerAddressesInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class DirectorySearchResponseValueInnerAddressesInner { - public static final String SERIALIZED_NAME_LINE1 = "line1"; - @SerializedName(SERIALIZED_NAME_LINE1) - private String line1; - - public static final String SERIALIZED_NAME_LINE2 = "line2"; - @SerializedName(SERIALIZED_NAME_LINE2) - private String line2; - - public static final String SERIALIZED_NAME_CITY = "city"; - @SerializedName(SERIALIZED_NAME_CITY) - private String city; - - public static final String SERIALIZED_NAME_STATE = "state"; - @SerializedName(SERIALIZED_NAME_STATE) - private String state; - - public static final String SERIALIZED_NAME_COUNTRY = "country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) - private String country; - - public DirectorySearchResponseValueInnerAddressesInner() { - } - - public DirectorySearchResponseValueInnerAddressesInner line1(String line1) { - this.line1 = line1; - return this; - } - - /** - * Address line 1 - * @return line1 - */ - @javax.annotation.Nullable - public String getLine1() { - return line1; - } - - public void setLine1(String line1) { - this.line1 = line1; - } - - - public DirectorySearchResponseValueInnerAddressesInner line2(String line2) { - this.line2 = line2; - return this; - } - - /** - * Address line 2 - * @return line2 - */ - @javax.annotation.Nullable - public String getLine2() { - return line2; - } - - public void setLine2(String line2) { - this.line2 = line2; - } - - - public DirectorySearchResponseValueInnerAddressesInner city(String city) { - this.city = city; - return this; - } - - /** - * City - * @return city - */ - @javax.annotation.Nullable - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - - public DirectorySearchResponseValueInnerAddressesInner state(String state) { - this.state = state; - return this; - } - - /** - * State - * @return state - */ - @javax.annotation.Nullable - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - - public DirectorySearchResponseValueInnerAddressesInner country(String country) { - this.country = country; - return this; - } - - /** - * Country - * @return country - */ - @javax.annotation.Nullable - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DirectorySearchResponseValueInnerAddressesInner directorySearchResponseValueInnerAddressesInner = (DirectorySearchResponseValueInnerAddressesInner) o; - return Objects.equals(this.line1, directorySearchResponseValueInnerAddressesInner.line1) && - Objects.equals(this.line2, directorySearchResponseValueInnerAddressesInner.line2) && - Objects.equals(this.city, directorySearchResponseValueInnerAddressesInner.city) && - Objects.equals(this.state, directorySearchResponseValueInnerAddressesInner.state) && - Objects.equals(this.country, directorySearchResponseValueInnerAddressesInner.country); - } - - @Override - public int hashCode() { - return Objects.hash(line1, line2, city, state, country); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DirectorySearchResponseValueInnerAddressesInner {\n"); - sb.append(" line1: ").append(toIndentedString(line1)).append("\n"); - sb.append(" line2: ").append(toIndentedString(line2)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("line1"); - openapiFields.add("line2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("country"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DirectorySearchResponseValueInnerAddressesInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DirectorySearchResponseValueInnerAddressesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DirectorySearchResponseValueInnerAddressesInner is not found in the empty JSON string", DirectorySearchResponseValueInnerAddressesInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DirectorySearchResponseValueInnerAddressesInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DirectorySearchResponseValueInnerAddressesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("line1") != null && !jsonObj.get("line1").isJsonNull()) && !jsonObj.get("line1").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `line1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("line1").toString())); - } - if ((jsonObj.get("line2") != null && !jsonObj.get("line2").isJsonNull()) && !jsonObj.get("line2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `line2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("line2").toString())); - } - if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); - } - if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); - } - if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DirectorySearchResponseValueInnerAddressesInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DirectorySearchResponseValueInnerAddressesInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DirectorySearchResponseValueInnerAddressesInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DirectorySearchResponseValueInnerAddressesInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DirectorySearchResponseValueInnerAddressesInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DirectorySearchResponseValueInnerAddressesInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of DirectorySearchResponseValueInnerAddressesInner - * @throws IOException if the JSON string is invalid with respect to DirectorySearchResponseValueInnerAddressesInner - */ - public static DirectorySearchResponseValueInnerAddressesInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DirectorySearchResponseValueInnerAddressesInner.class); - } - - /** - * Convert an instance of DirectorySearchResponseValueInnerAddressesInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.java deleted file mode 100644 index a28141a..0000000 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.EInvoicing.V1; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * DirectorySearchResponseValueInnerIdentifiersInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class DirectorySearchResponseValueInnerIdentifiersInner { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private String value; - - public DirectorySearchResponseValueInnerIdentifiersInner() { - } - - public DirectorySearchResponseValueInnerIdentifiersInner name(String name) { - this.name = name; - return this; - } - - /** - * Peppol Participant ID if the participant is in Peppol network - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public DirectorySearchResponseValueInnerIdentifiersInner value(String value) { - this.value = value; - return this; - } - - /** - * Value of the identifier - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DirectorySearchResponseValueInnerIdentifiersInner directorySearchResponseValueInnerIdentifiersInner = (DirectorySearchResponseValueInnerIdentifiersInner) o; - return Objects.equals(this.name, directorySearchResponseValueInnerIdentifiersInner.name) && - Objects.equals(this.value, directorySearchResponseValueInnerIdentifiersInner.value); - } - - @Override - public int hashCode() { - return Objects.hash(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DirectorySearchResponseValueInnerIdentifiersInner {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DirectorySearchResponseValueInnerIdentifiersInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DirectorySearchResponseValueInnerIdentifiersInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DirectorySearchResponseValueInnerIdentifiersInner is not found in the empty JSON string", DirectorySearchResponseValueInnerIdentifiersInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DirectorySearchResponseValueInnerIdentifiersInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DirectorySearchResponseValueInnerIdentifiersInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DirectorySearchResponseValueInnerIdentifiersInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DirectorySearchResponseValueInnerIdentifiersInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DirectorySearchResponseValueInnerIdentifiersInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DirectorySearchResponseValueInnerIdentifiersInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DirectorySearchResponseValueInnerIdentifiersInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DirectorySearchResponseValueInnerIdentifiersInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of DirectorySearchResponseValueInnerIdentifiersInner - * @throws IOException if the JSON string is invalid with respect to DirectorySearchResponseValueInnerIdentifiersInner - */ - public static DirectorySearchResponseValueInnerIdentifiersInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DirectorySearchResponseValueInnerIdentifiersInner.class); - } - - /** - * Convert an instance of DirectorySearchResponseValueInnerIdentifiersInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.java deleted file mode 100644 index d724aa7..0000000 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.EInvoicing.V1; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * DirectorySearchResponseValueInnerSupportedDocumentTypesInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class DirectorySearchResponseValueInnerSupportedDocumentTypesInner { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private String value; - - public static final String SERIALIZED_NAME_SUPPORTED_BY_TRADING_PARTNER = "supportedByTradingPartner"; - @SerializedName(SERIALIZED_NAME_SUPPORTED_BY_TRADING_PARTNER) - private Boolean supportedByTradingPartner; - - public static final String SERIALIZED_NAME_SUPPORTED_BY_AVALARA = "supportedByAvalara"; - @SerializedName(SERIALIZED_NAME_SUPPORTED_BY_AVALARA) - private Boolean supportedByAvalara; - - public DirectorySearchResponseValueInnerSupportedDocumentTypesInner() { - } - - public DirectorySearchResponseValueInnerSupportedDocumentTypesInner name(String name) { - this.name = name; - return this; - } - - /** - * Document type name. - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public DirectorySearchResponseValueInnerSupportedDocumentTypesInner value(String value) { - this.value = value; - return this; - } - - /** - * Document type identifier. - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - - public DirectorySearchResponseValueInnerSupportedDocumentTypesInner supportedByTradingPartner(Boolean supportedByTradingPartner) { - this.supportedByTradingPartner = supportedByTradingPartner; - return this; - } - - /** - * Does trading partner support receiving this document type - * @return supportedByTradingPartner - */ - @javax.annotation.Nullable - public Boolean getSupportedByTradingPartner() { - return supportedByTradingPartner; - } - - public void setSupportedByTradingPartner(Boolean supportedByTradingPartner) { - this.supportedByTradingPartner = supportedByTradingPartner; - } - - - public DirectorySearchResponseValueInnerSupportedDocumentTypesInner supportedByAvalara(Boolean supportedByAvalara) { - this.supportedByAvalara = supportedByAvalara; - return this; - } - - /** - * Does avalara support exchanging this document type - * @return supportedByAvalara - */ - @javax.annotation.Nullable - public Boolean getSupportedByAvalara() { - return supportedByAvalara; - } - - public void setSupportedByAvalara(Boolean supportedByAvalara) { - this.supportedByAvalara = supportedByAvalara; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DirectorySearchResponseValueInnerSupportedDocumentTypesInner directorySearchResponseValueInnerSupportedDocumentTypesInner = (DirectorySearchResponseValueInnerSupportedDocumentTypesInner) o; - return Objects.equals(this.name, directorySearchResponseValueInnerSupportedDocumentTypesInner.name) && - Objects.equals(this.value, directorySearchResponseValueInnerSupportedDocumentTypesInner.value) && - Objects.equals(this.supportedByTradingPartner, directorySearchResponseValueInnerSupportedDocumentTypesInner.supportedByTradingPartner) && - Objects.equals(this.supportedByAvalara, directorySearchResponseValueInnerSupportedDocumentTypesInner.supportedByAvalara); - } - - @Override - public int hashCode() { - return Objects.hash(name, value, supportedByTradingPartner, supportedByAvalara); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DirectorySearchResponseValueInnerSupportedDocumentTypesInner {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" supportedByTradingPartner: ").append(toIndentedString(supportedByTradingPartner)).append("\n"); - sb.append(" supportedByAvalara: ").append(toIndentedString(supportedByAvalara)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("value"); - openapiFields.add("supportedByTradingPartner"); - openapiFields.add("supportedByAvalara"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DirectorySearchResponseValueInnerSupportedDocumentTypesInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DirectorySearchResponseValueInnerSupportedDocumentTypesInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DirectorySearchResponseValueInnerSupportedDocumentTypesInner is not found in the empty JSON string", DirectorySearchResponseValueInnerSupportedDocumentTypesInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DirectorySearchResponseValueInnerSupportedDocumentTypesInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DirectorySearchResponseValueInnerSupportedDocumentTypesInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DirectorySearchResponseValueInnerSupportedDocumentTypesInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DirectorySearchResponseValueInnerSupportedDocumentTypesInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DirectorySearchResponseValueInnerSupportedDocumentTypesInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DirectorySearchResponseValueInnerSupportedDocumentTypesInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DirectorySearchResponseValueInnerSupportedDocumentTypesInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DirectorySearchResponseValueInnerSupportedDocumentTypesInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of DirectorySearchResponseValueInnerSupportedDocumentTypesInner - * @throws IOException if the JSON string is invalid with respect to DirectorySearchResponseValueInnerSupportedDocumentTypesInner - */ - public static DirectorySearchResponseValueInnerSupportedDocumentTypesInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DirectorySearchResponseValueInnerSupportedDocumentTypesInner.class); - } - - /** - * Convert an instance of DirectorySearchResponseValueInnerSupportedDocumentTypesInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetchRequest.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetchRequest.java deleted file mode 100644 index 74a875b..0000000 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetchRequest.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.EInvoicing.V1; - -import java.util.Objects; -import Avalara.SDK.model.EInvoicing.V1.DocumentFetchRequestDataInner; -import Avalara.SDK.model.EInvoicing.V1.DocumentFetchRequestMetadata; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * DocumentFetchRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class DocumentFetchRequest { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); - - public static final String SERIALIZED_NAME_METADATA = "metadata"; - @SerializedName(SERIALIZED_NAME_METADATA) - private DocumentFetchRequestMetadata metadata; - - public DocumentFetchRequest() { - } - - public DocumentFetchRequest data(List data) { - this.data = data; - return this; - } - - public DocumentFetchRequest addDataItem(DocumentFetchRequestDataInner dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } - this.data.add(dataItem); - return this; - } - - /** - * Array of key-value pairs used to retrieve inbound documents from the Tax Authority - * @return data - */ - @javax.annotation.Nullable - public List getData() { - return data; - } - - public void setData(List data) { - this.data = data; - } - - - public DocumentFetchRequest metadata(DocumentFetchRequestMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get metadata - * @return metadata - */ - @javax.annotation.Nullable - public DocumentFetchRequestMetadata getMetadata() { - return metadata; - } - - public void setMetadata(DocumentFetchRequestMetadata metadata) { - this.metadata = metadata; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DocumentFetchRequest documentFetchRequest = (DocumentFetchRequest) o; - return Objects.equals(this.data, documentFetchRequest.data) && - Objects.equals(this.metadata, documentFetchRequest.metadata); - } - - @Override - public int hashCode() { - return Objects.hash(data, metadata); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DocumentFetchRequest {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("metadata"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DocumentFetchRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DocumentFetchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DocumentFetchRequest is not found in the empty JSON string", DocumentFetchRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DocumentFetchRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DocumentFetchRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - if (jsonArraydata != null) { - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - // validate the optional field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - DocumentFetchRequestDataInner.validateJsonElement(jsonArraydata.get(i)); - }; - } - } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - DocumentFetchRequestMetadata.validateJsonElement(jsonObj.get("metadata")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DocumentFetchRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DocumentFetchRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DocumentFetchRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DocumentFetchRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DocumentFetchRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DocumentFetchRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of DocumentFetchRequest - * @throws IOException if the JSON string is invalid with respect to DocumentFetchRequest - */ - public static DocumentFetchRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DocumentFetchRequest.class); - } - - /** - * Convert an instance of DocumentFetchRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetchRequestDataInner.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetchRequestDataInner.java deleted file mode 100644 index 2812b19..0000000 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetchRequestDataInner.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.EInvoicing.V1; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * DocumentFetchRequestDataInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class DocumentFetchRequestDataInner { - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - private String key; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private String value; - - public DocumentFetchRequestDataInner() { - } - - public DocumentFetchRequestDataInner key(String key) { - this.key = key; - return this; - } - - /** - * Descriptor of the identifier - * @return key - */ - @javax.annotation.Nonnull - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - - public DocumentFetchRequestDataInner value(String value) { - this.value = value; - return this; - } - - /** - * Value of the identifier - * @return value - */ - @javax.annotation.Nonnull - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DocumentFetchRequestDataInner documentFetchRequestDataInner = (DocumentFetchRequestDataInner) o; - return Objects.equals(this.key, documentFetchRequestDataInner.key) && - Objects.equals(this.value, documentFetchRequestDataInner.value); - } - - @Override - public int hashCode() { - return Objects.hash(key, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DocumentFetchRequestDataInner {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("key"); - openapiFields.add("value"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("key"); - openapiRequiredFields.add("value"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DocumentFetchRequestDataInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DocumentFetchRequestDataInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DocumentFetchRequestDataInner is not found in the empty JSON string", DocumentFetchRequestDataInner.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DocumentFetchRequestDataInner.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DocumentFetchRequestDataInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DocumentFetchRequestDataInner.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); - } - if (!jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DocumentFetchRequestDataInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DocumentFetchRequestDataInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DocumentFetchRequestDataInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DocumentFetchRequestDataInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DocumentFetchRequestDataInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DocumentFetchRequestDataInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of DocumentFetchRequestDataInner - * @throws IOException if the JSON string is invalid with respect to DocumentFetchRequestDataInner - */ - public static DocumentFetchRequestDataInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DocumentFetchRequestDataInner.class); - } - - /** - * Convert an instance of DocumentFetchRequestDataInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetchRequestMetadata.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetchRequestMetadata.java deleted file mode 100644 index 50d9a06..0000000 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetchRequestMetadata.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.model.EInvoicing.V1; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * DocumentFetchRequestMetadata - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class DocumentFetchRequestMetadata { - public static final String SERIALIZED_NAME_WORKFLOW_ID = "workflowId"; - @SerializedName(SERIALIZED_NAME_WORKFLOW_ID) - private String workflowId; - - public static final String SERIALIZED_NAME_DATA_FORMAT = "dataFormat"; - @SerializedName(SERIALIZED_NAME_DATA_FORMAT) - private String dataFormat; - - public static final String SERIALIZED_NAME_DATA_FORMAT_VERSION = "dataFormatVersion"; - @SerializedName(SERIALIZED_NAME_DATA_FORMAT_VERSION) - private BigDecimal dataFormatVersion; - - public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; - @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) - private String countryCode; - - public static final String SERIALIZED_NAME_COUNTRY_MANDATE = "countryMandate"; - @SerializedName(SERIALIZED_NAME_COUNTRY_MANDATE) - private String countryMandate; - - public DocumentFetchRequestMetadata() { - } - - public DocumentFetchRequestMetadata workflowId(String workflowId) { - this.workflowId = workflowId; - return this; - } - - /** - * Specifies a unique ID for this workflow. - * @return workflowId - */ - @javax.annotation.Nonnull - public String getWorkflowId() { - return workflowId; - } - - public void setWorkflowId(String workflowId) { - this.workflowId = workflowId; - } - - - public DocumentFetchRequestMetadata dataFormat(String dataFormat) { - this.dataFormat = dataFormat; - return this; - } - - /** - * Specifies the data format for this workflow - * @return dataFormat - */ - @javax.annotation.Nonnull - public String getDataFormat() { - return dataFormat; - } - - public void setDataFormat(String dataFormat) { - this.dataFormat = dataFormat; - } - - - public DocumentFetchRequestMetadata dataFormatVersion(BigDecimal dataFormatVersion) { - this.dataFormatVersion = dataFormatVersion; - return this; - } - - /** - * Specifies the data format version number - * @return dataFormatVersion - */ - @javax.annotation.Nonnull - public BigDecimal getDataFormatVersion() { - return dataFormatVersion; - } - - public void setDataFormatVersion(BigDecimal dataFormatVersion) { - this.dataFormatVersion = dataFormatVersion; - } - - - public DocumentFetchRequestMetadata countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - /** - * The two-letter ISO-3166 country code for the country for which document is being retrieved - * @return countryCode - */ - @javax.annotation.Nonnull - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - - public DocumentFetchRequestMetadata countryMandate(String countryMandate) { - this.countryMandate = countryMandate; - return this; - } - - /** - * The e-invoicing mandate for the specified country - * @return countryMandate - */ - @javax.annotation.Nonnull - public String getCountryMandate() { - return countryMandate; - } - - public void setCountryMandate(String countryMandate) { - this.countryMandate = countryMandate; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DocumentFetchRequestMetadata documentFetchRequestMetadata = (DocumentFetchRequestMetadata) o; - return Objects.equals(this.workflowId, documentFetchRequestMetadata.workflowId) && - Objects.equals(this.dataFormat, documentFetchRequestMetadata.dataFormat) && - Objects.equals(this.dataFormatVersion, documentFetchRequestMetadata.dataFormatVersion) && - Objects.equals(this.countryCode, documentFetchRequestMetadata.countryCode) && - Objects.equals(this.countryMandate, documentFetchRequestMetadata.countryMandate); - } - - @Override - public int hashCode() { - return Objects.hash(workflowId, dataFormat, dataFormatVersion, countryCode, countryMandate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DocumentFetchRequestMetadata {\n"); - sb.append(" workflowId: ").append(toIndentedString(workflowId)).append("\n"); - sb.append(" dataFormat: ").append(toIndentedString(dataFormat)).append("\n"); - sb.append(" dataFormatVersion: ").append(toIndentedString(dataFormatVersion)).append("\n"); - sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); - sb.append(" countryMandate: ").append(toIndentedString(countryMandate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("workflowId"); - openapiFields.add("dataFormat"); - openapiFields.add("dataFormatVersion"); - openapiFields.add("countryCode"); - openapiFields.add("countryMandate"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("workflowId"); - openapiRequiredFields.add("dataFormat"); - openapiRequiredFields.add("dataFormatVersion"); - openapiRequiredFields.add("countryCode"); - openapiRequiredFields.add("countryMandate"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DocumentFetchRequestMetadata - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DocumentFetchRequestMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DocumentFetchRequestMetadata is not found in the empty JSON string", DocumentFetchRequestMetadata.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!DocumentFetchRequestMetadata.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DocumentFetchRequestMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DocumentFetchRequestMetadata.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("workflowId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `workflowId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("workflowId").toString())); - } - if (!jsonObj.get("dataFormat").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataFormat` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataFormat").toString())); - } - if (!jsonObj.get("countryCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); - } - if (!jsonObj.get("countryMandate").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `countryMandate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryMandate").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DocumentFetchRequestMetadata.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DocumentFetchRequestMetadata' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DocumentFetchRequestMetadata.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DocumentFetchRequestMetadata value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DocumentFetchRequestMetadata read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DocumentFetchRequestMetadata given an JSON string - * - * @param jsonString JSON string - * @return An instance of DocumentFetchRequestMetadata - * @throws IOException if the JSON string is invalid with respect to DocumentFetchRequestMetadata - */ - public static DocumentFetchRequestMetadata fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DocumentFetchRequestMetadata.class); - } - - /** - * Convert an instance of DocumentFetchRequestMetadata to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubmitDocumentData.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubmitDocumentData.java deleted file mode 100644 index 24e6857..0000000 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubmitDocumentData.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2022 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2022 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version - * @link https://github.com/avadev/AvaTax-REST-V3-JRE-SDK - */ - -package Avalara.SDK.model.EInvoicing.V1; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import Avalara.SDK.JSON; - -/** - * The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SubmitDocumentData { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private String data; - - public SubmitDocumentData() { - } - - public SubmitDocumentData data(String data) { - this.data = data; - return this; - } - - /** - * The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' - * @return data - **/ - @javax.annotation.Nullable - public String getData() { - return data; - } - - public void setData(String data) { - this.data = data; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubmitDocumentData submitDocumentData = (SubmitDocumentData) o; - return Objects.equals(this.data, submitDocumentData.data); - } - - @Override - public int hashCode() { - return Objects.hash(data); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubmitDocumentData {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to SubmitDocumentData - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!SubmitDocumentData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SubmitDocumentData is not found in the empty JSON string", SubmitDocumentData.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SubmitDocumentData.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SubmitDocumentData` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) && !jsonObj.get("data").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be a primitive type in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SubmitDocumentData.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SubmitDocumentData' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SubmitDocumentData.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SubmitDocumentData value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SubmitDocumentData read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of SubmitDocumentData given an JSON string - * - * @param jsonString JSON string - * @return An instance of SubmitDocumentData - * @throws IOException if the JSON string is invalid with respect to SubmitDocumentData - */ - public static SubmitDocumentData fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, SubmitDocumentData.class); - } - - /** - * Convert an instance of SubmitDocumentData to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} -