diff --git a/CHANGELOG.md b/CHANGELOG.md index b69cced..20c0ca7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 1.2.0 [September 21, 2020] + +- Renamed some internal models for template creation API endpoints. (CreateTemplateData / CreateTemplateData1 renamed to CreateHtmlTemplateData and CreateTemplateFromUploadData) + ### 1.1.0 [September 12, 2020] - **BREAKING CHANGE**: Renamed createTemplate operation to createPDFTemplate diff --git a/README.md b/README.md index 6c04a7c..5e2cf87 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ DocSpring is a service that helps you fill out and sign PDF templates. This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v1 -- Package version: 1.1.0 +- Package version: 1.2.0 - Build package: com.docspring.codegen.DocSpringPhpClientCodegen ## Requirements @@ -68,14 +68,14 @@ $apiInstance = new DocSpring\Api\PDFApi( new GuzzleHttp\Client(), $config ); -$template_id = tpl_000000000000000001; // string | -$request_body = array(new \DocSpring\Model\array()); // object[] | +$template_id = tpl_000000000000000002; // string | +$add_fields_data = new \DocSpring\Model\AddFieldsData(); // \DocSpring\Model\AddFieldsData | try { - $result = $apiInstance->batchGeneratePdfV1($template_id, $request_body); + $result = $apiInstance->addFieldsToTemplate($template_id, $add_fields_data); print_r($result); } catch (Exception $e) { - echo 'Exception when calling PDFApi->batchGeneratePdfV1: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PDFApi->addFieldsToTemplate: ', $e->getMessage(), PHP_EOL; } ?> @@ -87,6 +87,7 @@ All URIs are relative to *https://api.docspring.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*PDFApi* | [**addFieldsToTemplate**](docs/Api/PDFApi.md#addfieldstotemplate) | **PUT** /templates/{template_id}/add_fields | Add new fields to a Template *PDFApi* | [**batchGeneratePdfV1**](docs/Api/PDFApi.md#batchgeneratepdfv1) | **POST** /templates/{template_id}/submissions/batch | Generates multiple PDFs *PDFApi* | [**batchGeneratePdfs**](docs/Api/PDFApi.md#batchgeneratepdfs) | **POST** /submissions/batches | Generates multiple PDFs *PDFApi* | [**combinePdfs**](docs/Api/PDFApi.md#combinepdfs) | **POST** /combined_submissions?v=2 | Merge submission PDFs, template PDFs, or custom files @@ -120,6 +121,8 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [AddFieldsData](docs/Model/AddFieldsData.md) + - [AddFieldsTemplateResponse](docs/Model/AddFieldsTemplateResponse.md) - [AuthenticationError](docs/Model/AuthenticationError.md) - [AuthenticationSuccessResponse](docs/Model/AuthenticationSuccessResponse.md) - [CombinePdfsData](docs/Model/CombinePdfsData.md) @@ -130,18 +133,19 @@ Class | Method | HTTP request | Description - [CreateCustomFileData](docs/Model/CreateCustomFileData.md) - [CreateCustomFileResponse](docs/Model/CreateCustomFileResponse.md) - [CreateFolderData](docs/Model/CreateFolderData.md) + - [CreateHtmlTemplateData](docs/Model/CreateHtmlTemplateData.md) - [CreateSubmissionBatchResponse](docs/Model/CreateSubmissionBatchResponse.md) - [CreateSubmissionBatchSubmissionsResponse](docs/Model/CreateSubmissionBatchSubmissionsResponse.md) - [CreateSubmissionDataRequestData](docs/Model/CreateSubmissionDataRequestData.md) - [CreateSubmissionDataRequestTokenResponse](docs/Model/CreateSubmissionDataRequestTokenResponse.md) - [CreateSubmissionDataRequestTokenResponseToken](docs/Model/CreateSubmissionDataRequestTokenResponseToken.md) - [CreateSubmissionResponse](docs/Model/CreateSubmissionResponse.md) - - [CreateTemplateData](docs/Model/CreateTemplateData.md) - - [CreateTemplateData1](docs/Model/CreateTemplateData1.md) + - [CreateTemplateFromUploadData](docs/Model/CreateTemplateFromUploadData.md) - [CustomFile](docs/Model/CustomFile.md) - [Error](docs/Model/Error.md) - [Folder](docs/Model/Folder.md) - [FoldersFolder](docs/Model/FoldersFolder.md) + - [HtmlTemplateData](docs/Model/HtmlTemplateData.md) - [InvalidRequest](docs/Model/InvalidRequest.md) - [MoveFolderData](docs/Model/MoveFolderData.md) - [MoveTemplateData](docs/Model/MoveTemplateData.md) @@ -155,14 +159,15 @@ Class | Method | HTTP request | Description - [SubmissionDataBatchRequest](docs/Model/SubmissionDataBatchRequest.md) - [SubmissionDataRequest](docs/Model/SubmissionDataRequest.md) - [Template](docs/Model/Template.md) - - [TemplatesdesccachedUploadTemplate](docs/Model/TemplatesdesccachedUploadTemplate.md) - - [TemplatesdesccachedUploadTemplateDocument](docs/Model/TemplatesdesccachedUploadTemplateDocument.md) - - [TemplatesdesccachedUploadTemplateDocumentMetadata](docs/Model/TemplatesdesccachedUploadTemplateDocumentMetadata.md) - - [TemplatestemplateIdTemplate](docs/Model/TemplatestemplateIdTemplate.md) + - [TemplateData](docs/Model/TemplateData.md) + - [TemplatestemplateIdaddFieldsFields](docs/Model/TemplatestemplateIdaddFieldsFields.md) - [UpdateDataRequestResponse](docs/Model/UpdateDataRequestResponse.md) - [UpdateSubmissionDataRequestData](docs/Model/UpdateSubmissionDataRequestData.md) - [UpdateTemplateData](docs/Model/UpdateTemplateData.md) - [UpdateTemplateResponse](docs/Model/UpdateTemplateResponse.md) + - [UploadTemplateData](docs/Model/UploadTemplateData.md) + - [UploadTemplateDataDocument](docs/Model/UploadTemplateDataDocument.md) + - [UploadTemplateDataDocumentMetadata](docs/Model/UploadTemplateDataDocumentMetadata.md) ## Documentation For Authorization diff --git a/composer.json b/composer.json index 8dc8525..524a510 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "docspring/docspring", - "version": "1.1.0", + "version": "1.2.0", "description": "", "keywords": [ "openapitools", diff --git a/docs/Api/PDFApi.md b/docs/Api/PDFApi.md index 77a8f48..0f807ec 100644 --- a/docs/Api/PDFApi.md +++ b/docs/Api/PDFApi.md @@ -4,6 +4,7 @@ All URIs are relative to *https://api.docspring.com/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- +[**addFieldsToTemplate**](PDFApi.md#addFieldsToTemplate) | **PUT** /templates/{template_id}/add_fields | Add new fields to a Template [**batchGeneratePdfV1**](PDFApi.md#batchGeneratePdfV1) | **POST** /templates/{template_id}/submissions/batch | Generates multiple PDFs [**batchGeneratePdfs**](PDFApi.md#batchGeneratePdfs) | **POST** /submissions/batches | Generates multiple PDFs [**combinePdfs**](PDFApi.md#combinePdfs) | **POST** /combined_submissions?v=2 | Merge submission PDFs, template PDFs, or custom files @@ -35,6 +36,62 @@ Method | HTTP request | Description [**updateTemplate**](PDFApi.md#updateTemplate) | **PUT** /templates/{template_id} | Update a Template +# **addFieldsToTemplate** +> \DocSpring\Model\AddFieldsTemplateResponse addFieldsToTemplate($template_id, $add_fields_data) + +Add new fields to a Template + +### Example +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + + +$apiInstance = new DocSpring\Api\PDFApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$template_id = tpl_000000000000000002; // string | +$add_fields_data = new \DocSpring\Model\AddFieldsData(); // \DocSpring\Model\AddFieldsData | + +try { + $result = $apiInstance->addFieldsToTemplate($template_id, $add_fields_data); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PDFApi->addFieldsToTemplate: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **template_id** | **string**| | + **add_fields_data** | [**\DocSpring\Model\AddFieldsData**](../Model/AddFieldsData.md)| | + +### Return type + +[**\DocSpring\Model\AddFieldsTemplateResponse**](../Model/AddFieldsTemplateResponse.md) + +### Authorization + +[api_token_basic](../../README.md#api_token_basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) + # **batchGeneratePdfV1** > \DocSpring\Model\CreateSubmissionResponse[] batchGeneratePdfV1($template_id, $request_body) @@ -416,7 +473,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **createHTMLTemplate** -> \DocSpring\Model\PendingTemplate createHTMLTemplate($create_template_data1) +> \DocSpring\Model\PendingTemplate createHTMLTemplate($create_html_template_data) Create a new HTML template @@ -437,10 +494,10 @@ $apiInstance = new DocSpring\Api\PDFApi( new GuzzleHttp\Client(), $config ); -$create_template_data1 = new \DocSpring\Model\CreateTemplateData1(); // \DocSpring\Model\CreateTemplateData1 | +$create_html_template_data = new \DocSpring\Model\CreateHtmlTemplateData(); // \DocSpring\Model\CreateHtmlTemplateData | try { - $result = $apiInstance->createHTMLTemplate($create_template_data1); + $result = $apiInstance->createHTMLTemplate($create_html_template_data); print_r($result); } catch (Exception $e) { echo 'Exception when calling PDFApi->createHTMLTemplate: ', $e->getMessage(), PHP_EOL; @@ -452,7 +509,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **create_template_data1** | [**\DocSpring\Model\CreateTemplateData1**](../Model/CreateTemplateData1.md)| | + **create_html_template_data** | [**\DocSpring\Model\CreateHtmlTemplateData**](../Model/CreateHtmlTemplateData.md)| | ### Return type @@ -528,7 +585,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **createPDFTemplateFromUpload** -> \DocSpring\Model\PendingTemplate createPDFTemplateFromUpload($create_template_data) +> \DocSpring\Model\PendingTemplate createPDFTemplateFromUpload($create_template_from_upload_data) Create a new PDF template from a cached presign upload @@ -549,10 +606,10 @@ $apiInstance = new DocSpring\Api\PDFApi( new GuzzleHttp\Client(), $config ); -$create_template_data = new \DocSpring\Model\CreateTemplateData(); // \DocSpring\Model\CreateTemplateData | +$create_template_from_upload_data = new \DocSpring\Model\CreateTemplateFromUploadData(); // \DocSpring\Model\CreateTemplateFromUploadData | try { - $result = $apiInstance->createPDFTemplateFromUpload($create_template_data); + $result = $apiInstance->createPDFTemplateFromUpload($create_template_from_upload_data); print_r($result); } catch (Exception $e) { echo 'Exception when calling PDFApi->createPDFTemplateFromUpload: ', $e->getMessage(), PHP_EOL; @@ -564,7 +621,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **create_template_data** | [**\DocSpring\Model\CreateTemplateData**](../Model/CreateTemplateData.md)| | + **create_template_from_upload_data** | [**\DocSpring\Model\CreateTemplateFromUploadData**](../Model/CreateTemplateFromUploadData.md)| | ### Return type diff --git a/docs/Model/CreateTemplateData.md b/docs/Model/AddFieldsData.md similarity index 66% rename from docs/Model/CreateTemplateData.md rename to docs/Model/AddFieldsData.md index ac7fde8..b504b0d 100644 --- a/docs/Model/CreateTemplateData.md +++ b/docs/Model/AddFieldsData.md @@ -1,9 +1,9 @@ -# CreateTemplateData +# AddFieldsData ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**template** | [**\DocSpring\Model\TemplatesdesccachedUploadTemplate**](TemplatesdesccachedUploadTemplate.md) | | +**fields** | [**\DocSpring\Model\TemplatestemplateIdaddFieldsFields[]**](TemplatestemplateIdaddFieldsFields.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/AddFieldsTemplateResponse.md b/docs/Model/AddFieldsTemplateResponse.md new file mode 100644 index 0000000..1dbc3fe --- /dev/null +++ b/docs/Model/AddFieldsTemplateResponse.md @@ -0,0 +1,12 @@ +# AddFieldsTemplateResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_field_ids** | **int[]** | | [optional] +**errors** | **string[]** | | [optional] +**status** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/CreateTemplateData1.md b/docs/Model/CreateHtmlTemplateData.md similarity index 66% rename from docs/Model/CreateTemplateData1.md rename to docs/Model/CreateHtmlTemplateData.md index aa4abe8..0d92898 100644 --- a/docs/Model/CreateTemplateData1.md +++ b/docs/Model/CreateHtmlTemplateData.md @@ -1,9 +1,9 @@ -# CreateTemplateData1 +# CreateHtmlTemplateData ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**template** | [**\DocSpring\Model\TemplatesdesccachedUploadTemplate**](TemplatesdesccachedUploadTemplate.md) | | +**template** | [**\DocSpring\Model\HtmlTemplateData**](HtmlTemplateData.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/CreateTemplateFromUploadData.md b/docs/Model/CreateTemplateFromUploadData.md new file mode 100644 index 0000000..d05e81c --- /dev/null +++ b/docs/Model/CreateTemplateFromUploadData.md @@ -0,0 +1,10 @@ +# CreateTemplateFromUploadData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**template** | [**\DocSpring\Model\UploadTemplateData**](UploadTemplateData.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/TemplatesdesccachedUploadTemplate.md b/docs/Model/HtmlTemplateData.md similarity index 85% rename from docs/Model/TemplatesdesccachedUploadTemplate.md rename to docs/Model/HtmlTemplateData.md index a255a2d..5e81af4 100644 --- a/docs/Model/TemplatesdesccachedUploadTemplate.md +++ b/docs/Model/HtmlTemplateData.md @@ -1,4 +1,4 @@ -# TemplatesdesccachedUploadTemplate +# HtmlTemplateData ## Properties Name | Type | Description | Notes @@ -8,7 +8,6 @@ Name | Type | Description | Notes **scss** | **string** | | [optional] **expire_after** | **float** | | [optional] **allow_additional_properties** | **bool** | | [optional] -**document** | [**\DocSpring\Model\TemplatesdesccachedUploadTemplateDocument**](TemplatesdesccachedUploadTemplateDocument.md) | | [optional] **description** | **string** | | [optional] **public_submissions** | **bool** | | [optional] **slack_webhook_url** | **string** | | [optional] diff --git a/docs/Model/PendingTemplate.md b/docs/Model/PendingTemplate.md index 2a2252e..caccc77 100644 --- a/docs/Model/PendingTemplate.md +++ b/docs/Model/PendingTemplate.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **name** | **string** | | [optional] **template_type** | **string** | | [optional] **id** | **string** | | [optional] +**locked** | **bool** | | [optional] **redirect_url** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/Submission.md b/docs/Model/Submission.md index f3852a1..e55369f 100644 --- a/docs/Model/Submission.md +++ b/docs/Model/Submission.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **processed_at** | **string** | | [optional] **state** | **string** | | **metadata** | **object** | | [optional] +**truncated_text** | **object** | | [optional] **pdf_hash** | **string** | | [optional] **download_url** | **string** | | [optional] **permanent_download_url** | **string** | | [optional] diff --git a/docs/Model/Template.md b/docs/Model/Template.md index fa54d87..60574b6 100644 --- a/docs/Model/Template.md +++ b/docs/Model/Template.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **template_type** | **string** | | [optional] **id** | **string** | | [optional] **page_dimensions** | [**float[][]**](array.md) | | [optional] +**locked** | **bool** | | [optional] **redirect_url** | **string** | | [optional] **document_url** | **string** | | [optional] diff --git a/docs/Model/TemplatestemplateIdTemplate.md b/docs/Model/TemplateData.md similarity index 97% rename from docs/Model/TemplatestemplateIdTemplate.md rename to docs/Model/TemplateData.md index ef2c7cd..98fbdd4 100644 --- a/docs/Model/TemplatestemplateIdTemplate.md +++ b/docs/Model/TemplateData.md @@ -1,4 +1,4 @@ -# TemplatestemplateIdTemplate +# TemplateData ## Properties Name | Type | Description | Notes diff --git a/docs/Model/TemplatestemplateIdaddFieldsFields.md b/docs/Model/TemplatestemplateIdaddFieldsFields.md new file mode 100644 index 0000000..58d86ad --- /dev/null +++ b/docs/Model/TemplatestemplateIdaddFieldsFields.md @@ -0,0 +1,94 @@ +# TemplatestemplateIdaddFieldsFields + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uppercase** | **bool** | | [optional] +**background_color_field_name** | **string** | | [optional] +**metadata** | **string** | | [optional] +**barcode_symbology** | **string** | | [optional] +**min_length** | **float** | | [optional] +**integer** | **bool** | | [optional] +**type** | **string** | | [optional] +**required** | **bool** | | [optional] +**comb_value_offset** | **float** | | [optional] +**image_gravity** | **string** | | [optional] +**overflow** | **string** | | [optional] +**qrcode_color** | **string** | | [optional] +**color_field_required** | **bool** | | [optional] +**background_color_field_required** | **bool** | | [optional] +**id** | **float** | | [optional] +**image_scale_type** | **string** | | [optional] +**exclusive_minimum** | **bool** | | [optional] +**height** | **float** | | [optional] +**number_condition_range_exclusive_max** | **bool** | | [optional] +**invert_boolean_condition** | **bool** | | [optional] +**static** | **bool** | | [optional] +**shape_fill_color_field_name** | **string** | | [optional] +**shape_border_color_field_name** | **string** | | [optional] +**v_alignment** | **string** | | [optional] +**bold** | **bool** | | [optional] +**shape_border_width** | **float** | | [optional] +**comb_number_of_cells** | **float** | | [optional] +**shape_border_color** | **string** | | [optional] +**typeface** | **string** | | [optional] +**comb** | **bool** | | [optional] +**shape_type** | **string** | | [optional] +**display_type** | **string** | | [optional] +**condition** | **string** | | [optional] +**check_color** | **string** | | [optional] +**multiline_lines** | **float** | | [optional] +**multiline** | **bool** | | [optional] +**true_text** | **string** | | [optional] +**name** | **string** | | [optional] +**font_size** | **float** | | [optional] +**page** | **float** | | [optional] +**alignment** | **string** | | [optional] +**max_length** | **float** | | [optional] +**auto_calculate_max_length** | **bool** | | [optional] +**color_field_name** | **string** | | [optional] +**qrcode_color_field_name** | **string** | | [optional] +**number_condition_range_min** | **float** | | [optional] +**hidden** | **bool** | | [optional] +**color** | **string** | | [optional] +**check_color_field_required** | **bool** | | [optional] +**combined_field_format** | **string** | | [optional] +**description** | **string** | | [optional] +**shape_border_color_field_required** | **bool** | | [optional] +**combined_field_names** | **string** | | [optional] +**title** | **string** | | [optional] +**number_condition_range_exclusive_min** | **bool** | | [optional] +**combined_field_separator** | **string** | | [optional] +**exclusive_maximum** | **bool** | | [optional] +**default** | **string** | | [optional] +**combined_field_type** | **string** | | [optional] +**date_time_format** | **string** | | [optional] +**qrcode_color_field_required** | **bool** | | [optional] +**currency** | **bool** | | [optional] +**strikethrough** | **bool** | | [optional] +**false_text** | **string** | | [optional] +**character_spacing** | **float** | | [optional] +**number_condition_range_max** | **float** | | [optional] +**background_color** | **string** | | [optional] +**check_color_field_name** | **string** | | [optional] +**check_character** | **string** | | [optional] +**rotation** | **float** | | [optional] +**option_list** | **string** | | [optional] +**shape_fill_color** | **string** | | [optional] +**string_condition_type** | **string** | | [optional] +**shape_fill_color_field_required** | **bool** | | [optional] +**include_time** | **bool** | | [optional] +**decimal_places** | **float** | | [optional] +**x** | **float** | | [optional] +**width** | **float** | | [optional] +**maximum** | **float** | | [optional] +**y** | **float** | | [optional] +**signature_allow_draw** | **bool** | | [optional] +**opacity** | **float** | | [optional] +**number_condition_type** | **string** | | [optional] +**minimum** | **float** | | [optional] +**signature_allow_type** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/UpdateTemplateData.md b/docs/Model/UpdateTemplateData.md index ac81e71..b6f1bb6 100644 --- a/docs/Model/UpdateTemplateData.md +++ b/docs/Model/UpdateTemplateData.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**template** | [**\DocSpring\Model\TemplatestemplateIdTemplate**](TemplatestemplateIdTemplate.md) | | +**template** | [**\DocSpring\Model\TemplateData**](TemplateData.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Model/UploadTemplateData.md b/docs/Model/UploadTemplateData.md new file mode 100644 index 0000000..361bd66 --- /dev/null +++ b/docs/Model/UploadTemplateData.md @@ -0,0 +1,27 @@ +# UploadTemplateData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expiration_interval** | **string** | | [optional] +**webhook_url** | **string** | | [optional] +**scss** | **string** | | [optional] +**expire_after** | **float** | | [optional] +**allow_additional_properties** | **bool** | | [optional] +**document** | [**\DocSpring\Model\UploadTemplateDataDocument**](UploadTemplateDataDocument.md) | | [optional] +**description** | **string** | | [optional] +**public_submissions** | **bool** | | [optional] +**slack_webhook_url** | **string** | | [optional] +**header_html** | **string** | | [optional] +**public_web_form** | **bool** | | [optional] +**editable_submissions** | **bool** | | [optional] +**expire_submissions** | **bool** | | [optional] +**name** | **string** | | [optional] +**html** | **string** | | [optional] +**footer_html** | **string** | | [optional] +**template_type** | **string** | | [optional] +**redirect_url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Model/TemplatesdesccachedUploadTemplateDocument.md b/docs/Model/UploadTemplateDataDocument.md similarity index 63% rename from docs/Model/TemplatesdesccachedUploadTemplateDocument.md rename to docs/Model/UploadTemplateDataDocument.md index 3aa66f5..3f6e75c 100644 --- a/docs/Model/TemplatesdesccachedUploadTemplateDocument.md +++ b/docs/Model/UploadTemplateDataDocument.md @@ -1,9 +1,9 @@ -# TemplatesdesccachedUploadTemplateDocument +# UploadTemplateDataDocument ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**metadata** | [**\DocSpring\Model\TemplatesdesccachedUploadTemplateDocumentMetadata**](TemplatesdesccachedUploadTemplateDocumentMetadata.md) | | [optional] +**metadata** | [**\DocSpring\Model\UploadTemplateDataDocumentMetadata**](UploadTemplateDataDocumentMetadata.md) | | [optional] **id** | **string** | | [optional] **storage** | **string** | | [optional] diff --git a/docs/Model/TemplatesdesccachedUploadTemplateDocumentMetadata.md b/docs/Model/UploadTemplateDataDocumentMetadata.md similarity index 88% rename from docs/Model/TemplatesdesccachedUploadTemplateDocumentMetadata.md rename to docs/Model/UploadTemplateDataDocumentMetadata.md index 84cc131..a62b088 100644 --- a/docs/Model/TemplatesdesccachedUploadTemplateDocumentMetadata.md +++ b/docs/Model/UploadTemplateDataDocumentMetadata.md @@ -1,4 +1,4 @@ -# TemplatesdesccachedUploadTemplateDocumentMetadata +# UploadTemplateDataDocumentMetadata ## Properties Name | Type | Description | Notes diff --git a/lib/Api/PDFApi.php b/lib/Api/PDFApi.php index dba649e..373a0d9 100644 --- a/lib/Api/PDFApi.php +++ b/lib/Api/PDFApi.php @@ -87,6 +87,328 @@ public function getConfig() return $this->config; } + /** + * Operation addFieldsToTemplate + * + * Add new fields to a Template + * + * @param string $template_id template_id (required) + * @param \DocSpring\Model\AddFieldsData $add_fields_data add_fields_data (required) + * + * @throws \DocSpring\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \DocSpring\Model\AddFieldsTemplateResponse|\DocSpring\Model\AddFieldsTemplateResponse + */ + public function addFieldsToTemplate($template_id, $add_fields_data) + { + list($response) = $this->addFieldsToTemplateWithHttpInfo($template_id, $add_fields_data); + return $response; + } + + /** + * Operation addFieldsToTemplateWithHttpInfo + * + * Add new fields to a Template + * + * @param string $template_id (required) + * @param \DocSpring\Model\AddFieldsData $add_fields_data (required) + * + * @throws \DocSpring\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \DocSpring\Model\AddFieldsTemplateResponse|\DocSpring\Model\AddFieldsTemplateResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function addFieldsToTemplateWithHttpInfo($template_id, $add_fields_data) + { + $request = $this->addFieldsToTemplateRequest($template_id, $add_fields_data); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\DocSpring\Model\AddFieldsTemplateResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ('\DocSpring\Model\AddFieldsTemplateResponse' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\DocSpring\Model\AddFieldsTemplateResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 422: + if ('\DocSpring\Model\AddFieldsTemplateResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ('\DocSpring\Model\AddFieldsTemplateResponse' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\DocSpring\Model\AddFieldsTemplateResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\DocSpring\Model\AddFieldsTemplateResponse'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DocSpring\Model\AddFieldsTemplateResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 422: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DocSpring\Model\AddFieldsTemplateResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation addFieldsToTemplateAsync + * + * Add new fields to a Template + * + * @param string $template_id (required) + * @param \DocSpring\Model\AddFieldsData $add_fields_data (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addFieldsToTemplateAsync($template_id, $add_fields_data) + { + return $this->addFieldsToTemplateAsyncWithHttpInfo($template_id, $add_fields_data) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation addFieldsToTemplateAsyncWithHttpInfo + * + * Add new fields to a Template + * + * @param string $template_id (required) + * @param \DocSpring\Model\AddFieldsData $add_fields_data (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addFieldsToTemplateAsyncWithHttpInfo($template_id, $add_fields_data) + { + $returnType = '\DocSpring\Model\AddFieldsTemplateResponse'; + $request = $this->addFieldsToTemplateRequest($template_id, $add_fields_data); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'addFieldsToTemplate' + * + * @param string $template_id (required) + * @param \DocSpring\Model\AddFieldsData $add_fields_data (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function addFieldsToTemplateRequest($template_id, $add_fields_data) + { + // verify the required parameter 'template_id' is set + if ($template_id === null || (is_array($template_id) && count($template_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $template_id when calling addFieldsToTemplate' + ); + } + // verify the required parameter 'add_fields_data' is set + if ($add_fields_data === null || (is_array($add_fields_data) && count($add_fields_data) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $add_fields_data when calling addFieldsToTemplate' + ); + } + + $resourcePath = '/templates/{template_id}/add_fields'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($template_id !== null) { + $resourcePath = str_replace( + '{' . 'template_id' . '}', + ObjectSerializer::toPathValue($template_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($add_fields_data)) { + $_tempBody = $add_fields_data; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation batchGeneratePdfV1 * @@ -2467,15 +2789,15 @@ protected function createFolderRequest($create_folder_data) * * Create a new HTML template * - * @param \DocSpring\Model\CreateTemplateData1 $create_template_data1 create_template_data1 (required) + * @param \DocSpring\Model\CreateHtmlTemplateData $create_html_template_data create_html_template_data (required) * * @throws \DocSpring\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \DocSpring\Model\PendingTemplate|\DocSpring\Model\AuthenticationError */ - public function createHTMLTemplate($create_template_data1) + public function createHTMLTemplate($create_html_template_data) { - list($response) = $this->createHTMLTemplateWithHttpInfo($create_template_data1); + list($response) = $this->createHTMLTemplateWithHttpInfo($create_html_template_data); return $response; } @@ -2484,15 +2806,15 @@ public function createHTMLTemplate($create_template_data1) * * Create a new HTML template * - * @param \DocSpring\Model\CreateTemplateData1 $create_template_data1 (required) + * @param \DocSpring\Model\CreateHtmlTemplateData $create_html_template_data (required) * * @throws \DocSpring\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \DocSpring\Model\PendingTemplate|\DocSpring\Model\AuthenticationError, HTTP status code, HTTP response headers (array of strings) */ - public function createHTMLTemplateWithHttpInfo($create_template_data1) + public function createHTMLTemplateWithHttpInfo($create_html_template_data) { - $request = $this->createHTMLTemplateRequest($create_template_data1); + $request = $this->createHTMLTemplateRequest($create_html_template_data); try { $options = $this->createHttpClientOption(); @@ -2601,14 +2923,14 @@ public function createHTMLTemplateWithHttpInfo($create_template_data1) * * Create a new HTML template * - * @param \DocSpring\Model\CreateTemplateData1 $create_template_data1 (required) + * @param \DocSpring\Model\CreateHtmlTemplateData $create_html_template_data (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createHTMLTemplateAsync($create_template_data1) + public function createHTMLTemplateAsync($create_html_template_data) { - return $this->createHTMLTemplateAsyncWithHttpInfo($create_template_data1) + return $this->createHTMLTemplateAsyncWithHttpInfo($create_html_template_data) ->then( function ($response) { return $response[0]; @@ -2621,15 +2943,15 @@ function ($response) { * * Create a new HTML template * - * @param \DocSpring\Model\CreateTemplateData1 $create_template_data1 (required) + * @param \DocSpring\Model\CreateHtmlTemplateData $create_html_template_data (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createHTMLTemplateAsyncWithHttpInfo($create_template_data1) + public function createHTMLTemplateAsyncWithHttpInfo($create_html_template_data) { $returnType = '\DocSpring\Model\PendingTemplate'; - $request = $this->createHTMLTemplateRequest($create_template_data1); + $request = $this->createHTMLTemplateRequest($create_html_template_data); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2671,17 +2993,17 @@ function ($exception) { /** * Create request for operation 'createHTMLTemplate' * - * @param \DocSpring\Model\CreateTemplateData1 $create_template_data1 (required) + * @param \DocSpring\Model\CreateHtmlTemplateData $create_html_template_data (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createHTMLTemplateRequest($create_template_data1) + protected function createHTMLTemplateRequest($create_html_template_data) { - // verify the required parameter 'create_template_data1' is set - if ($create_template_data1 === null || (is_array($create_template_data1) && count($create_template_data1) === 0)) { + // verify the required parameter 'create_html_template_data' is set + if ($create_html_template_data === null || (is_array($create_html_template_data) && count($create_html_template_data) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $create_template_data1 when calling createHTMLTemplate' + 'Missing the required parameter $create_html_template_data when calling createHTMLTemplate' ); } @@ -2696,8 +3018,8 @@ protected function createHTMLTemplateRequest($create_template_data1) // body params $_tempBody = null; - if (isset($create_template_data1)) { - $_tempBody = $create_template_data1; + if (isset($create_html_template_data)) { + $_tempBody = $create_html_template_data; } if ($multipart) { @@ -3099,15 +3421,15 @@ protected function createPDFTemplateRequest($template_document, $template_name, * * Create a new PDF template from a cached presign upload * - * @param \DocSpring\Model\CreateTemplateData $create_template_data create_template_data (required) + * @param \DocSpring\Model\CreateTemplateFromUploadData $create_template_from_upload_data create_template_from_upload_data (required) * * @throws \DocSpring\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \DocSpring\Model\PendingTemplate|\DocSpring\Model\AuthenticationError */ - public function createPDFTemplateFromUpload($create_template_data) + public function createPDFTemplateFromUpload($create_template_from_upload_data) { - list($response) = $this->createPDFTemplateFromUploadWithHttpInfo($create_template_data); + list($response) = $this->createPDFTemplateFromUploadWithHttpInfo($create_template_from_upload_data); return $response; } @@ -3116,15 +3438,15 @@ public function createPDFTemplateFromUpload($create_template_data) * * Create a new PDF template from a cached presign upload * - * @param \DocSpring\Model\CreateTemplateData $create_template_data (required) + * @param \DocSpring\Model\CreateTemplateFromUploadData $create_template_from_upload_data (required) * * @throws \DocSpring\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \DocSpring\Model\PendingTemplate|\DocSpring\Model\AuthenticationError, HTTP status code, HTTP response headers (array of strings) */ - public function createPDFTemplateFromUploadWithHttpInfo($create_template_data) + public function createPDFTemplateFromUploadWithHttpInfo($create_template_from_upload_data) { - $request = $this->createPDFTemplateFromUploadRequest($create_template_data); + $request = $this->createPDFTemplateFromUploadRequest($create_template_from_upload_data); try { $options = $this->createHttpClientOption(); @@ -3233,14 +3555,14 @@ public function createPDFTemplateFromUploadWithHttpInfo($create_template_data) * * Create a new PDF template from a cached presign upload * - * @param \DocSpring\Model\CreateTemplateData $create_template_data (required) + * @param \DocSpring\Model\CreateTemplateFromUploadData $create_template_from_upload_data (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createPDFTemplateFromUploadAsync($create_template_data) + public function createPDFTemplateFromUploadAsync($create_template_from_upload_data) { - return $this->createPDFTemplateFromUploadAsyncWithHttpInfo($create_template_data) + return $this->createPDFTemplateFromUploadAsyncWithHttpInfo($create_template_from_upload_data) ->then( function ($response) { return $response[0]; @@ -3253,15 +3575,15 @@ function ($response) { * * Create a new PDF template from a cached presign upload * - * @param \DocSpring\Model\CreateTemplateData $create_template_data (required) + * @param \DocSpring\Model\CreateTemplateFromUploadData $create_template_from_upload_data (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createPDFTemplateFromUploadAsyncWithHttpInfo($create_template_data) + public function createPDFTemplateFromUploadAsyncWithHttpInfo($create_template_from_upload_data) { $returnType = '\DocSpring\Model\PendingTemplate'; - $request = $this->createPDFTemplateFromUploadRequest($create_template_data); + $request = $this->createPDFTemplateFromUploadRequest($create_template_from_upload_data); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3303,17 +3625,17 @@ function ($exception) { /** * Create request for operation 'createPDFTemplateFromUpload' * - * @param \DocSpring\Model\CreateTemplateData $create_template_data (required) + * @param \DocSpring\Model\CreateTemplateFromUploadData $create_template_from_upload_data (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createPDFTemplateFromUploadRequest($create_template_data) + protected function createPDFTemplateFromUploadRequest($create_template_from_upload_data) { - // verify the required parameter 'create_template_data' is set - if ($create_template_data === null || (is_array($create_template_data) && count($create_template_data) === 0)) { + // verify the required parameter 'create_template_from_upload_data' is set + if ($create_template_from_upload_data === null || (is_array($create_template_from_upload_data) && count($create_template_from_upload_data) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $create_template_data when calling createPDFTemplateFromUpload' + 'Missing the required parameter $create_template_from_upload_data when calling createPDFTemplateFromUpload' ); } @@ -3328,8 +3650,8 @@ protected function createPDFTemplateFromUploadRequest($create_template_data) // body params $_tempBody = null; - if (isset($create_template_data)) { - $_tempBody = $create_template_data; + if (isset($create_template_from_upload_data)) { + $_tempBody = $create_template_from_upload_data; } if ($multipart) { diff --git a/lib/Configuration.php b/lib/Configuration.php index bcb9af6..3bdfa35 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -397,7 +397,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' OpenAPI Spec Version: v1' . PHP_EOL; - $report .= ' SDK Package Version: 1.1.0' . PHP_EOL; + $report .= ' SDK Package Version: 1.2.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/AddFieldsData.php b/lib/Model/AddFieldsData.php new file mode 100644 index 0000000..9fc91a8 --- /dev/null +++ b/lib/Model/AddFieldsData.php @@ -0,0 +1,300 @@ + '\DocSpring\Model\TemplatestemplateIdaddFieldsFields[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'fields' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fields' => 'fields' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fields' => 'setFields' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fields' => 'getFields' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['fields'] = isset($data['fields']) ? $data['fields'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fields'] === null) { + $invalidProperties[] = "'fields' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fields + * + * @return \DocSpring\Model\TemplatestemplateIdaddFieldsFields[] + */ + public function getFields() + { + return $this->container['fields']; + } + + /** + * Sets fields + * + * @param \DocSpring\Model\TemplatestemplateIdaddFieldsFields[] $fields fields + * + * @return $this + */ + public function setFields($fields) + { + $this->container['fields'] = $fields; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + + diff --git a/lib/Model/AddFieldsTemplateResponse.php b/lib/Model/AddFieldsTemplateResponse.php new file mode 100644 index 0000000..c9d4a87 --- /dev/null +++ b/lib/Model/AddFieldsTemplateResponse.php @@ -0,0 +1,389 @@ + 'int[]', + 'errors' => 'string[]', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'new_field_ids' => null, + 'errors' => null, + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'new_field_ids' => 'new_field_ids', + 'errors' => 'errors', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'new_field_ids' => 'setNewFieldIds', + 'errors' => 'setErrors', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'new_field_ids' => 'getNewFieldIds', + 'errors' => 'getErrors', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const STATUS_SUCCESS = 'success'; + const STATUS_ERROR = 'error'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_SUCCESS, + self::STATUS_ERROR, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['new_field_ids'] = isset($data['new_field_ids']) ? $data['new_field_ids'] : null; + $this->container['errors'] = isset($data['errors']) ? $data['errors'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets new_field_ids + * + * @return int[]|null + */ + public function getNewFieldIds() + { + return $this->container['new_field_ids']; + } + + /** + * Sets new_field_ids + * + * @param int[]|null $new_field_ids new_field_ids + * + * @return $this + */ + public function setNewFieldIds($new_field_ids) + { + $this->container['new_field_ids'] = $new_field_ids; + + return $this; + } + + /** + * Gets errors + * + * @return string[]|null + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param string[]|null $errors errors + * + * @return $this + */ + public function setErrors($errors) + { + $this->container['errors'] = $errors; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($status) && !in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + + diff --git a/lib/Model/CreateTemplateData.php b/lib/Model/CreateHtmlTemplateData.php similarity index 93% rename from lib/Model/CreateTemplateData.php rename to lib/Model/CreateHtmlTemplateData.php index fdaa8d7..2f07aca 100644 --- a/lib/Model/CreateTemplateData.php +++ b/lib/Model/CreateHtmlTemplateData.php @@ -1,6 +1,6 @@ '\DocSpring\Model\TemplatesdesccachedUploadTemplate' + 'template' => '\DocSpring\Model\HtmlTemplateData' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets template * - * @return \DocSpring\Model\TemplatesdesccachedUploadTemplate + * @return \DocSpring\Model\HtmlTemplateData */ public function getTemplate() { @@ -220,7 +220,7 @@ public function getTemplate() /** * Sets template * - * @param \DocSpring\Model\TemplatesdesccachedUploadTemplate $template template + * @param \DocSpring\Model\HtmlTemplateData $template template * * @return $this */ diff --git a/lib/Model/CreateTemplateData1.php b/lib/Model/CreateTemplateFromUploadData.php similarity index 93% rename from lib/Model/CreateTemplateData1.php rename to lib/Model/CreateTemplateFromUploadData.php index 5f1c2ab..4a16007 100644 --- a/lib/Model/CreateTemplateData1.php +++ b/lib/Model/CreateTemplateFromUploadData.php @@ -1,6 +1,6 @@ '\DocSpring\Model\TemplatesdesccachedUploadTemplate' + 'template' => '\DocSpring\Model\UploadTemplateData' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets template * - * @return \DocSpring\Model\TemplatesdesccachedUploadTemplate + * @return \DocSpring\Model\UploadTemplateData */ public function getTemplate() { @@ -220,7 +220,7 @@ public function getTemplate() /** * Sets template * - * @param \DocSpring\Model\TemplatesdesccachedUploadTemplate $template template + * @param \DocSpring\Model\UploadTemplateData $template template * * @return $this */ diff --git a/lib/Model/HtmlTemplateData.php b/lib/Model/HtmlTemplateData.php new file mode 100644 index 0000000..2c7bd66 --- /dev/null +++ b/lib/Model/HtmlTemplateData.php @@ -0,0 +1,843 @@ + 'string', + 'webhook_url' => 'string', + 'scss' => 'string', + 'expire_after' => 'float', + 'allow_additional_properties' => 'bool', + 'description' => 'string', + 'public_submissions' => 'bool', + 'slack_webhook_url' => 'string', + 'header_html' => 'string', + 'public_web_form' => 'bool', + 'editable_submissions' => 'bool', + 'expire_submissions' => 'bool', + 'name' => 'string', + 'html' => 'string', + 'footer_html' => 'string', + 'template_type' => 'string', + 'redirect_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'expiration_interval' => null, + 'webhook_url' => null, + 'scss' => null, + 'expire_after' => null, + 'allow_additional_properties' => null, + 'description' => null, + 'public_submissions' => null, + 'slack_webhook_url' => null, + 'header_html' => null, + 'public_web_form' => null, + 'editable_submissions' => null, + 'expire_submissions' => null, + 'name' => null, + 'html' => null, + 'footer_html' => null, + 'template_type' => null, + 'redirect_url' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'expiration_interval' => 'expiration_interval', + 'webhook_url' => 'webhook_url', + 'scss' => 'scss', + 'expire_after' => 'expire_after', + 'allow_additional_properties' => 'allow_additional_properties', + 'description' => 'description', + 'public_submissions' => 'public_submissions', + 'slack_webhook_url' => 'slack_webhook_url', + 'header_html' => 'header_html', + 'public_web_form' => 'public_web_form', + 'editable_submissions' => 'editable_submissions', + 'expire_submissions' => 'expire_submissions', + 'name' => 'name', + 'html' => 'html', + 'footer_html' => 'footer_html', + 'template_type' => 'template_type', + 'redirect_url' => 'redirect_url' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'expiration_interval' => 'setExpirationInterval', + 'webhook_url' => 'setWebhookUrl', + 'scss' => 'setScss', + 'expire_after' => 'setExpireAfter', + 'allow_additional_properties' => 'setAllowAdditionalProperties', + 'description' => 'setDescription', + 'public_submissions' => 'setPublicSubmissions', + 'slack_webhook_url' => 'setSlackWebhookUrl', + 'header_html' => 'setHeaderHtml', + 'public_web_form' => 'setPublicWebForm', + 'editable_submissions' => 'setEditableSubmissions', + 'expire_submissions' => 'setExpireSubmissions', + 'name' => 'setName', + 'html' => 'setHtml', + 'footer_html' => 'setFooterHtml', + 'template_type' => 'setTemplateType', + 'redirect_url' => 'setRedirectUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'expiration_interval' => 'getExpirationInterval', + 'webhook_url' => 'getWebhookUrl', + 'scss' => 'getScss', + 'expire_after' => 'getExpireAfter', + 'allow_additional_properties' => 'getAllowAdditionalProperties', + 'description' => 'getDescription', + 'public_submissions' => 'getPublicSubmissions', + 'slack_webhook_url' => 'getSlackWebhookUrl', + 'header_html' => 'getHeaderHtml', + 'public_web_form' => 'getPublicWebForm', + 'editable_submissions' => 'getEditableSubmissions', + 'expire_submissions' => 'getExpireSubmissions', + 'name' => 'getName', + 'html' => 'getHtml', + 'footer_html' => 'getFooterHtml', + 'template_type' => 'getTemplateType', + 'redirect_url' => 'getRedirectUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const EXPIRATION_INTERVAL_MINUTES = 'minutes'; + const EXPIRATION_INTERVAL_HOURS = 'hours'; + const EXPIRATION_INTERVAL_DAYS = 'days'; + const TEMPLATE_TYPE_PDF = 'pdf'; + const TEMPLATE_TYPE_HTML = 'html'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getExpirationIntervalAllowableValues() + { + return [ + self::EXPIRATION_INTERVAL_MINUTES, + self::EXPIRATION_INTERVAL_HOURS, + self::EXPIRATION_INTERVAL_DAYS, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTemplateTypeAllowableValues() + { + return [ + self::TEMPLATE_TYPE_PDF, + self::TEMPLATE_TYPE_HTML, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['expiration_interval'] = isset($data['expiration_interval']) ? $data['expiration_interval'] : null; + $this->container['webhook_url'] = isset($data['webhook_url']) ? $data['webhook_url'] : null; + $this->container['scss'] = isset($data['scss']) ? $data['scss'] : null; + $this->container['expire_after'] = isset($data['expire_after']) ? $data['expire_after'] : null; + $this->container['allow_additional_properties'] = isset($data['allow_additional_properties']) ? $data['allow_additional_properties'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['public_submissions'] = isset($data['public_submissions']) ? $data['public_submissions'] : null; + $this->container['slack_webhook_url'] = isset($data['slack_webhook_url']) ? $data['slack_webhook_url'] : null; + $this->container['header_html'] = isset($data['header_html']) ? $data['header_html'] : null; + $this->container['public_web_form'] = isset($data['public_web_form']) ? $data['public_web_form'] : null; + $this->container['editable_submissions'] = isset($data['editable_submissions']) ? $data['editable_submissions'] : null; + $this->container['expire_submissions'] = isset($data['expire_submissions']) ? $data['expire_submissions'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['html'] = isset($data['html']) ? $data['html'] : null; + $this->container['footer_html'] = isset($data['footer_html']) ? $data['footer_html'] : null; + $this->container['template_type'] = isset($data['template_type']) ? $data['template_type'] : null; + $this->container['redirect_url'] = isset($data['redirect_url']) ? $data['redirect_url'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getExpirationIntervalAllowableValues(); + if (!is_null($this->container['expiration_interval']) && !in_array($this->container['expiration_interval'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'expiration_interval', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTemplateTypeAllowableValues(); + if (!is_null($this->container['template_type']) && !in_array($this->container['template_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'template_type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets expiration_interval + * + * @return string|null + */ + public function getExpirationInterval() + { + return $this->container['expiration_interval']; + } + + /** + * Sets expiration_interval + * + * @param string|null $expiration_interval expiration_interval + * + * @return $this + */ + public function setExpirationInterval($expiration_interval) + { + $allowedValues = $this->getExpirationIntervalAllowableValues(); + if (!is_null($expiration_interval) && !in_array($expiration_interval, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'expiration_interval', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['expiration_interval'] = $expiration_interval; + + return $this; + } + + /** + * Gets webhook_url + * + * @return string|null + */ + public function getWebhookUrl() + { + return $this->container['webhook_url']; + } + + /** + * Sets webhook_url + * + * @param string|null $webhook_url webhook_url + * + * @return $this + */ + public function setWebhookUrl($webhook_url) + { + $this->container['webhook_url'] = $webhook_url; + + return $this; + } + + /** + * Gets scss + * + * @return string|null + */ + public function getScss() + { + return $this->container['scss']; + } + + /** + * Sets scss + * + * @param string|null $scss scss + * + * @return $this + */ + public function setScss($scss) + { + $this->container['scss'] = $scss; + + return $this; + } + + /** + * Gets expire_after + * + * @return float|null + */ + public function getExpireAfter() + { + return $this->container['expire_after']; + } + + /** + * Sets expire_after + * + * @param float|null $expire_after expire_after + * + * @return $this + */ + public function setExpireAfter($expire_after) + { + $this->container['expire_after'] = $expire_after; + + return $this; + } + + /** + * Gets allow_additional_properties + * + * @return bool|null + */ + public function getAllowAdditionalProperties() + { + return $this->container['allow_additional_properties']; + } + + /** + * Sets allow_additional_properties + * + * @param bool|null $allow_additional_properties allow_additional_properties + * + * @return $this + */ + public function setAllowAdditionalProperties($allow_additional_properties) + { + $this->container['allow_additional_properties'] = $allow_additional_properties; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets public_submissions + * + * @return bool|null + */ + public function getPublicSubmissions() + { + return $this->container['public_submissions']; + } + + /** + * Sets public_submissions + * + * @param bool|null $public_submissions public_submissions + * + * @return $this + */ + public function setPublicSubmissions($public_submissions) + { + $this->container['public_submissions'] = $public_submissions; + + return $this; + } + + /** + * Gets slack_webhook_url + * + * @return string|null + */ + public function getSlackWebhookUrl() + { + return $this->container['slack_webhook_url']; + } + + /** + * Sets slack_webhook_url + * + * @param string|null $slack_webhook_url slack_webhook_url + * + * @return $this + */ + public function setSlackWebhookUrl($slack_webhook_url) + { + $this->container['slack_webhook_url'] = $slack_webhook_url; + + return $this; + } + + /** + * Gets header_html + * + * @return string|null + */ + public function getHeaderHtml() + { + return $this->container['header_html']; + } + + /** + * Sets header_html + * + * @param string|null $header_html header_html + * + * @return $this + */ + public function setHeaderHtml($header_html) + { + $this->container['header_html'] = $header_html; + + return $this; + } + + /** + * Gets public_web_form + * + * @return bool|null + */ + public function getPublicWebForm() + { + return $this->container['public_web_form']; + } + + /** + * Sets public_web_form + * + * @param bool|null $public_web_form public_web_form + * + * @return $this + */ + public function setPublicWebForm($public_web_form) + { + $this->container['public_web_form'] = $public_web_form; + + return $this; + } + + /** + * Gets editable_submissions + * + * @return bool|null + */ + public function getEditableSubmissions() + { + return $this->container['editable_submissions']; + } + + /** + * Sets editable_submissions + * + * @param bool|null $editable_submissions editable_submissions + * + * @return $this + */ + public function setEditableSubmissions($editable_submissions) + { + $this->container['editable_submissions'] = $editable_submissions; + + return $this; + } + + /** + * Gets expire_submissions + * + * @return bool|null + */ + public function getExpireSubmissions() + { + return $this->container['expire_submissions']; + } + + /** + * Sets expire_submissions + * + * @param bool|null $expire_submissions expire_submissions + * + * @return $this + */ + public function setExpireSubmissions($expire_submissions) + { + $this->container['expire_submissions'] = $expire_submissions; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets html + * + * @return string|null + */ + public function getHtml() + { + return $this->container['html']; + } + + /** + * Sets html + * + * @param string|null $html html + * + * @return $this + */ + public function setHtml($html) + { + $this->container['html'] = $html; + + return $this; + } + + /** + * Gets footer_html + * + * @return string|null + */ + public function getFooterHtml() + { + return $this->container['footer_html']; + } + + /** + * Sets footer_html + * + * @param string|null $footer_html footer_html + * + * @return $this + */ + public function setFooterHtml($footer_html) + { + $this->container['footer_html'] = $footer_html; + + return $this; + } + + /** + * Gets template_type + * + * @return string|null + */ + public function getTemplateType() + { + return $this->container['template_type']; + } + + /** + * Sets template_type + * + * @param string|null $template_type template_type + * + * @return $this + */ + public function setTemplateType($template_type) + { + $allowedValues = $this->getTemplateTypeAllowableValues(); + if (!is_null($template_type) && !in_array($template_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'template_type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['template_type'] = $template_type; + + return $this; + } + + /** + * Gets redirect_url + * + * @return string|null + */ + public function getRedirectUrl() + { + return $this->container['redirect_url']; + } + + /** + * Sets redirect_url + * + * @param string|null $redirect_url redirect_url + * + * @return $this + */ + public function setRedirectUrl($redirect_url) + { + $this->container['redirect_url'] = $redirect_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + + diff --git a/lib/Model/PendingTemplate.php b/lib/Model/PendingTemplate.php index 91d2963..9dd5dcf 100644 --- a/lib/Model/PendingTemplate.php +++ b/lib/Model/PendingTemplate.php @@ -72,6 +72,7 @@ class PendingTemplate implements ModelInterface, ArrayAccess 'name' => 'string', 'template_type' => 'string', 'id' => 'string', + 'locked' => 'bool', 'redirect_url' => 'string' ]; @@ -96,6 +97,7 @@ class PendingTemplate implements ModelInterface, ArrayAccess 'name' => null, 'template_type' => null, 'id' => null, + 'locked' => null, 'redirect_url' => null ]; @@ -141,6 +143,7 @@ public static function openAPIFormats() 'name' => 'name', 'template_type' => 'template_type', 'id' => 'id', + 'locked' => 'locked', 'redirect_url' => 'redirect_url' ]; @@ -165,6 +168,7 @@ public static function openAPIFormats() 'name' => 'setName', 'template_type' => 'setTemplateType', 'id' => 'setId', + 'locked' => 'setLocked', 'redirect_url' => 'setRedirectUrl' ]; @@ -189,6 +193,7 @@ public static function openAPIFormats() 'name' => 'getName', 'template_type' => 'getTemplateType', 'id' => 'getId', + 'locked' => 'getLocked', 'redirect_url' => 'getRedirectUrl' ]; @@ -284,6 +289,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['template_type'] = isset($data['template_type']) ? $data['template_type'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['locked'] = isset($data['locked']) ? $data['locked'] : null; $this->container['redirect_url'] = isset($data['redirect_url']) ? $data['redirect_url'] : null; } @@ -688,6 +694,30 @@ public function setId($id) return $this; } + /** + * Gets locked + * + * @return bool|null + */ + public function getLocked() + { + return $this->container['locked']; + } + + /** + * Sets locked + * + * @param bool|null $locked locked + * + * @return $this + */ + public function setLocked($locked) + { + $this->container['locked'] = $locked; + + return $this; + } + /** * Gets redirect_url * diff --git a/lib/Model/Submission.php b/lib/Model/Submission.php index efb23b2..15dbe35 100644 --- a/lib/Model/Submission.php +++ b/lib/Model/Submission.php @@ -66,6 +66,7 @@ class Submission implements ModelInterface, ArrayAccess 'processed_at' => 'string', 'state' => 'string', 'metadata' => 'object', + 'truncated_text' => 'object', 'pdf_hash' => 'string', 'download_url' => 'string', 'permanent_download_url' => 'string', @@ -89,6 +90,7 @@ class Submission implements ModelInterface, ArrayAccess 'processed_at' => null, 'state' => null, 'metadata' => null, + 'truncated_text' => null, 'pdf_hash' => null, 'download_url' => null, 'permanent_download_url' => null, @@ -133,6 +135,7 @@ public static function openAPIFormats() 'processed_at' => 'processed_at', 'state' => 'state', 'metadata' => 'metadata', + 'truncated_text' => 'truncated_text', 'pdf_hash' => 'pdf_hash', 'download_url' => 'download_url', 'permanent_download_url' => 'permanent_download_url', @@ -156,6 +159,7 @@ public static function openAPIFormats() 'processed_at' => 'setProcessedAt', 'state' => 'setState', 'metadata' => 'setMetadata', + 'truncated_text' => 'setTruncatedText', 'pdf_hash' => 'setPdfHash', 'download_url' => 'setDownloadUrl', 'permanent_download_url' => 'setPermanentDownloadUrl', @@ -179,6 +183,7 @@ public static function openAPIFormats() 'processed_at' => 'getProcessedAt', 'state' => 'getState', 'metadata' => 'getMetadata', + 'truncated_text' => 'getTruncatedText', 'pdf_hash' => 'getPdfHash', 'download_url' => 'getDownloadUrl', 'permanent_download_url' => 'getPermanentDownloadUrl', @@ -289,6 +294,7 @@ public function __construct(array $data = null) $this->container['processed_at'] = isset($data['processed_at']) ? $data['processed_at'] : null; $this->container['state'] = isset($data['state']) ? $data['state'] : null; $this->container['metadata'] = isset($data['metadata']) ? $data['metadata'] : null; + $this->container['truncated_text'] = isset($data['truncated_text']) ? $data['truncated_text'] : null; $this->container['pdf_hash'] = isset($data['pdf_hash']) ? $data['pdf_hash'] : null; $this->container['download_url'] = isset($data['download_url']) ? $data['download_url'] : null; $this->container['permanent_download_url'] = isset($data['permanent_download_url']) ? $data['permanent_download_url'] : null; @@ -566,6 +572,30 @@ public function setMetadata($metadata) return $this; } + /** + * Gets truncated_text + * + * @return object|null + */ + public function getTruncatedText() + { + return $this->container['truncated_text']; + } + + /** + * Sets truncated_text + * + * @param object|null $truncated_text truncated_text + * + * @return $this + */ + public function setTruncatedText($truncated_text) + { + $this->container['truncated_text'] = $truncated_text; + + return $this; + } + /** * Gets pdf_hash * diff --git a/lib/Model/Template.php b/lib/Model/Template.php index 476a19a..0111da1 100644 --- a/lib/Model/Template.php +++ b/lib/Model/Template.php @@ -74,6 +74,7 @@ class Template implements ModelInterface, ArrayAccess 'template_type' => 'string', 'id' => 'string', 'page_dimensions' => 'float[][]', + 'locked' => 'bool', 'redirect_url' => 'string', 'document_url' => 'string' ]; @@ -101,6 +102,7 @@ class Template implements ModelInterface, ArrayAccess 'template_type' => null, 'id' => null, 'page_dimensions' => null, + 'locked' => null, 'redirect_url' => null, 'document_url' => null ]; @@ -149,6 +151,7 @@ public static function openAPIFormats() 'template_type' => 'template_type', 'id' => 'id', 'page_dimensions' => 'page_dimensions', + 'locked' => 'locked', 'redirect_url' => 'redirect_url', 'document_url' => 'document_url' ]; @@ -176,6 +179,7 @@ public static function openAPIFormats() 'template_type' => 'setTemplateType', 'id' => 'setId', 'page_dimensions' => 'setPageDimensions', + 'locked' => 'setLocked', 'redirect_url' => 'setRedirectUrl', 'document_url' => 'setDocumentUrl' ]; @@ -203,6 +207,7 @@ public static function openAPIFormats() 'template_type' => 'getTemplateType', 'id' => 'getId', 'page_dimensions' => 'getPageDimensions', + 'locked' => 'getLocked', 'redirect_url' => 'getRedirectUrl', 'document_url' => 'getDocumentUrl' ]; @@ -301,6 +306,7 @@ public function __construct(array $data = null) $this->container['template_type'] = isset($data['template_type']) ? $data['template_type'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['page_dimensions'] = isset($data['page_dimensions']) ? $data['page_dimensions'] : null; + $this->container['locked'] = isset($data['locked']) ? $data['locked'] : null; $this->container['redirect_url'] = isset($data['redirect_url']) ? $data['redirect_url'] : null; $this->container['document_url'] = isset($data['document_url']) ? $data['document_url'] : null; } @@ -754,6 +760,30 @@ public function setPageDimensions($page_dimensions) return $this; } + /** + * Gets locked + * + * @return bool|null + */ + public function getLocked() + { + return $this->container['locked']; + } + + /** + * Sets locked + * + * @param bool|null $locked locked + * + * @return $this + */ + public function setLocked($locked) + { + $this->container['locked'] = $locked; + + return $this; + } + /** * Gets redirect_url * diff --git a/lib/Model/TemplatestemplateIdTemplate.php b/lib/Model/TemplateData.php similarity index 98% rename from lib/Model/TemplatestemplateIdTemplate.php rename to lib/Model/TemplateData.php index 94d7041..1bfe223 100644 --- a/lib/Model/TemplatestemplateIdTemplate.php +++ b/lib/Model/TemplateData.php @@ -1,6 +1,6 @@ 'bool', + 'background_color_field_name' => 'string', + 'metadata' => 'string', + 'barcode_symbology' => 'string', + 'min_length' => 'float', + 'integer' => 'bool', + 'type' => 'string', + 'required' => 'bool', + 'comb_value_offset' => 'float', + 'image_gravity' => 'string', + 'overflow' => 'string', + 'qrcode_color' => 'string', + 'color_field_required' => 'bool', + 'background_color_field_required' => 'bool', + 'id' => 'float', + 'image_scale_type' => 'string', + 'exclusive_minimum' => 'bool', + 'height' => 'float', + 'number_condition_range_exclusive_max' => 'bool', + 'invert_boolean_condition' => 'bool', + 'static' => 'bool', + 'shape_fill_color_field_name' => 'string', + 'shape_border_color_field_name' => 'string', + 'v_alignment' => 'string', + 'bold' => 'bool', + 'shape_border_width' => 'float', + 'comb_number_of_cells' => 'float', + 'shape_border_color' => 'string', + 'typeface' => 'string', + 'comb' => 'bool', + 'shape_type' => 'string', + 'display_type' => 'string', + 'condition' => 'string', + 'check_color' => 'string', + 'multiline_lines' => 'float', + 'multiline' => 'bool', + 'true_text' => 'string', + 'name' => 'string', + 'font_size' => 'float', + 'page' => 'float', + 'alignment' => 'string', + 'max_length' => 'float', + 'auto_calculate_max_length' => 'bool', + 'color_field_name' => 'string', + 'qrcode_color_field_name' => 'string', + 'number_condition_range_min' => 'float', + 'hidden' => 'bool', + 'color' => 'string', + 'check_color_field_required' => 'bool', + 'combined_field_format' => 'string', + 'description' => 'string', + 'shape_border_color_field_required' => 'bool', + 'combined_field_names' => 'string', + 'title' => 'string', + 'number_condition_range_exclusive_min' => 'bool', + 'combined_field_separator' => 'string', + 'exclusive_maximum' => 'bool', + 'default' => 'string', + 'combined_field_type' => 'string', + 'date_time_format' => 'string', + 'qrcode_color_field_required' => 'bool', + 'currency' => 'bool', + 'strikethrough' => 'bool', + 'false_text' => 'string', + 'character_spacing' => 'float', + 'number_condition_range_max' => 'float', + 'background_color' => 'string', + 'check_color_field_name' => 'string', + 'check_character' => 'string', + 'rotation' => 'float', + 'option_list' => 'string', + 'shape_fill_color' => 'string', + 'string_condition_type' => 'string', + 'shape_fill_color_field_required' => 'bool', + 'include_time' => 'bool', + 'decimal_places' => 'float', + 'x' => 'float', + 'width' => 'float', + 'maximum' => 'float', + 'y' => 'float', + 'signature_allow_draw' => 'bool', + 'opacity' => 'float', + 'number_condition_type' => 'string', + 'minimum' => 'float', + 'signature_allow_type' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'uppercase' => null, + 'background_color_field_name' => null, + 'metadata' => null, + 'barcode_symbology' => null, + 'min_length' => null, + 'integer' => null, + 'type' => null, + 'required' => null, + 'comb_value_offset' => null, + 'image_gravity' => null, + 'overflow' => null, + 'qrcode_color' => null, + 'color_field_required' => null, + 'background_color_field_required' => null, + 'id' => null, + 'image_scale_type' => null, + 'exclusive_minimum' => null, + 'height' => null, + 'number_condition_range_exclusive_max' => null, + 'invert_boolean_condition' => null, + 'static' => null, + 'shape_fill_color_field_name' => null, + 'shape_border_color_field_name' => null, + 'v_alignment' => null, + 'bold' => null, + 'shape_border_width' => null, + 'comb_number_of_cells' => null, + 'shape_border_color' => null, + 'typeface' => null, + 'comb' => null, + 'shape_type' => null, + 'display_type' => null, + 'condition' => null, + 'check_color' => null, + 'multiline_lines' => null, + 'multiline' => null, + 'true_text' => null, + 'name' => null, + 'font_size' => null, + 'page' => null, + 'alignment' => null, + 'max_length' => null, + 'auto_calculate_max_length' => null, + 'color_field_name' => null, + 'qrcode_color_field_name' => null, + 'number_condition_range_min' => null, + 'hidden' => null, + 'color' => null, + 'check_color_field_required' => null, + 'combined_field_format' => null, + 'description' => null, + 'shape_border_color_field_required' => null, + 'combined_field_names' => null, + 'title' => null, + 'number_condition_range_exclusive_min' => null, + 'combined_field_separator' => null, + 'exclusive_maximum' => null, + 'default' => null, + 'combined_field_type' => null, + 'date_time_format' => null, + 'qrcode_color_field_required' => null, + 'currency' => null, + 'strikethrough' => null, + 'false_text' => null, + 'character_spacing' => null, + 'number_condition_range_max' => null, + 'background_color' => null, + 'check_color_field_name' => null, + 'check_character' => null, + 'rotation' => null, + 'option_list' => null, + 'shape_fill_color' => null, + 'string_condition_type' => null, + 'shape_fill_color_field_required' => null, + 'include_time' => null, + 'decimal_places' => null, + 'x' => null, + 'width' => null, + 'maximum' => null, + 'y' => null, + 'signature_allow_draw' => null, + 'opacity' => null, + 'number_condition_type' => null, + 'minimum' => null, + 'signature_allow_type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'uppercase' => 'uppercase', + 'background_color_field_name' => 'backgroundColorFieldName', + 'metadata' => 'metadata', + 'barcode_symbology' => 'barcodeSymbology', + 'min_length' => 'minLength', + 'integer' => 'integer', + 'type' => 'type', + 'required' => 'required', + 'comb_value_offset' => 'combValueOffset', + 'image_gravity' => 'imageGravity', + 'overflow' => 'overflow', + 'qrcode_color' => 'qrcodeColor', + 'color_field_required' => 'colorFieldRequired', + 'background_color_field_required' => 'backgroundColorFieldRequired', + 'id' => 'id', + 'image_scale_type' => 'imageScaleType', + 'exclusive_minimum' => 'exclusiveMinimum', + 'height' => 'height', + 'number_condition_range_exclusive_max' => 'numberConditionRangeExclusiveMax', + 'invert_boolean_condition' => 'invertBooleanCondition', + 'static' => 'static', + 'shape_fill_color_field_name' => 'shapeFillColorFieldName', + 'shape_border_color_field_name' => 'shapeBorderColorFieldName', + 'v_alignment' => 'vAlignment', + 'bold' => 'bold', + 'shape_border_width' => 'shapeBorderWidth', + 'comb_number_of_cells' => 'combNumberOfCells', + 'shape_border_color' => 'shapeBorderColor', + 'typeface' => 'typeface', + 'comb' => 'comb', + 'shape_type' => 'shapeType', + 'display_type' => 'displayType', + 'condition' => 'condition', + 'check_color' => 'checkColor', + 'multiline_lines' => 'multilineLines', + 'multiline' => 'multiline', + 'true_text' => 'trueText', + 'name' => 'name', + 'font_size' => 'fontSize', + 'page' => 'page', + 'alignment' => 'alignment', + 'max_length' => 'maxLength', + 'auto_calculate_max_length' => 'autoCalculateMaxLength', + 'color_field_name' => 'colorFieldName', + 'qrcode_color_field_name' => 'qrcodeColorFieldName', + 'number_condition_range_min' => 'numberConditionRangeMin', + 'hidden' => 'hidden', + 'color' => 'color', + 'check_color_field_required' => 'checkColorFieldRequired', + 'combined_field_format' => 'combinedFieldFormat', + 'description' => 'description', + 'shape_border_color_field_required' => 'shapeBorderColorFieldRequired', + 'combined_field_names' => 'combinedFieldNames', + 'title' => 'title', + 'number_condition_range_exclusive_min' => 'numberConditionRangeExclusiveMin', + 'combined_field_separator' => 'combinedFieldSeparator', + 'exclusive_maximum' => 'exclusiveMaximum', + 'default' => 'default', + 'combined_field_type' => 'combinedFieldType', + 'date_time_format' => 'dateTimeFormat', + 'qrcode_color_field_required' => 'qrcodeColorFieldRequired', + 'currency' => 'currency', + 'strikethrough' => 'strikethrough', + 'false_text' => 'falseText', + 'character_spacing' => 'characterSpacing', + 'number_condition_range_max' => 'numberConditionRangeMax', + 'background_color' => 'backgroundColor', + 'check_color_field_name' => 'checkColorFieldName', + 'check_character' => 'checkCharacter', + 'rotation' => 'rotation', + 'option_list' => 'optionList', + 'shape_fill_color' => 'shapeFillColor', + 'string_condition_type' => 'stringConditionType', + 'shape_fill_color_field_required' => 'shapeFillColorFieldRequired', + 'include_time' => 'includeTime', + 'decimal_places' => 'decimalPlaces', + 'x' => 'x', + 'width' => 'width', + 'maximum' => 'maximum', + 'y' => 'y', + 'signature_allow_draw' => 'signatureAllowDraw', + 'opacity' => 'opacity', + 'number_condition_type' => 'numberConditionType', + 'minimum' => 'minimum', + 'signature_allow_type' => 'signatureAllowType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'uppercase' => 'setUppercase', + 'background_color_field_name' => 'setBackgroundColorFieldName', + 'metadata' => 'setMetadata', + 'barcode_symbology' => 'setBarcodeSymbology', + 'min_length' => 'setMinLength', + 'integer' => 'setInteger', + 'type' => 'setType', + 'required' => 'setRequired', + 'comb_value_offset' => 'setCombValueOffset', + 'image_gravity' => 'setImageGravity', + 'overflow' => 'setOverflow', + 'qrcode_color' => 'setQrcodeColor', + 'color_field_required' => 'setColorFieldRequired', + 'background_color_field_required' => 'setBackgroundColorFieldRequired', + 'id' => 'setId', + 'image_scale_type' => 'setImageScaleType', + 'exclusive_minimum' => 'setExclusiveMinimum', + 'height' => 'setHeight', + 'number_condition_range_exclusive_max' => 'setNumberConditionRangeExclusiveMax', + 'invert_boolean_condition' => 'setInvertBooleanCondition', + 'static' => 'setStatic', + 'shape_fill_color_field_name' => 'setShapeFillColorFieldName', + 'shape_border_color_field_name' => 'setShapeBorderColorFieldName', + 'v_alignment' => 'setVAlignment', + 'bold' => 'setBold', + 'shape_border_width' => 'setShapeBorderWidth', + 'comb_number_of_cells' => 'setCombNumberOfCells', + 'shape_border_color' => 'setShapeBorderColor', + 'typeface' => 'setTypeface', + 'comb' => 'setComb', + 'shape_type' => 'setShapeType', + 'display_type' => 'setDisplayType', + 'condition' => 'setCondition', + 'check_color' => 'setCheckColor', + 'multiline_lines' => 'setMultilineLines', + 'multiline' => 'setMultiline', + 'true_text' => 'setTrueText', + 'name' => 'setName', + 'font_size' => 'setFontSize', + 'page' => 'setPage', + 'alignment' => 'setAlignment', + 'max_length' => 'setMaxLength', + 'auto_calculate_max_length' => 'setAutoCalculateMaxLength', + 'color_field_name' => 'setColorFieldName', + 'qrcode_color_field_name' => 'setQrcodeColorFieldName', + 'number_condition_range_min' => 'setNumberConditionRangeMin', + 'hidden' => 'setHidden', + 'color' => 'setColor', + 'check_color_field_required' => 'setCheckColorFieldRequired', + 'combined_field_format' => 'setCombinedFieldFormat', + 'description' => 'setDescription', + 'shape_border_color_field_required' => 'setShapeBorderColorFieldRequired', + 'combined_field_names' => 'setCombinedFieldNames', + 'title' => 'setTitle', + 'number_condition_range_exclusive_min' => 'setNumberConditionRangeExclusiveMin', + 'combined_field_separator' => 'setCombinedFieldSeparator', + 'exclusive_maximum' => 'setExclusiveMaximum', + 'default' => 'setDefault', + 'combined_field_type' => 'setCombinedFieldType', + 'date_time_format' => 'setDateTimeFormat', + 'qrcode_color_field_required' => 'setQrcodeColorFieldRequired', + 'currency' => 'setCurrency', + 'strikethrough' => 'setStrikethrough', + 'false_text' => 'setFalseText', + 'character_spacing' => 'setCharacterSpacing', + 'number_condition_range_max' => 'setNumberConditionRangeMax', + 'background_color' => 'setBackgroundColor', + 'check_color_field_name' => 'setCheckColorFieldName', + 'check_character' => 'setCheckCharacter', + 'rotation' => 'setRotation', + 'option_list' => 'setOptionList', + 'shape_fill_color' => 'setShapeFillColor', + 'string_condition_type' => 'setStringConditionType', + 'shape_fill_color_field_required' => 'setShapeFillColorFieldRequired', + 'include_time' => 'setIncludeTime', + 'decimal_places' => 'setDecimalPlaces', + 'x' => 'setX', + 'width' => 'setWidth', + 'maximum' => 'setMaximum', + 'y' => 'setY', + 'signature_allow_draw' => 'setSignatureAllowDraw', + 'opacity' => 'setOpacity', + 'number_condition_type' => 'setNumberConditionType', + 'minimum' => 'setMinimum', + 'signature_allow_type' => 'setSignatureAllowType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'uppercase' => 'getUppercase', + 'background_color_field_name' => 'getBackgroundColorFieldName', + 'metadata' => 'getMetadata', + 'barcode_symbology' => 'getBarcodeSymbology', + 'min_length' => 'getMinLength', + 'integer' => 'getInteger', + 'type' => 'getType', + 'required' => 'getRequired', + 'comb_value_offset' => 'getCombValueOffset', + 'image_gravity' => 'getImageGravity', + 'overflow' => 'getOverflow', + 'qrcode_color' => 'getQrcodeColor', + 'color_field_required' => 'getColorFieldRequired', + 'background_color_field_required' => 'getBackgroundColorFieldRequired', + 'id' => 'getId', + 'image_scale_type' => 'getImageScaleType', + 'exclusive_minimum' => 'getExclusiveMinimum', + 'height' => 'getHeight', + 'number_condition_range_exclusive_max' => 'getNumberConditionRangeExclusiveMax', + 'invert_boolean_condition' => 'getInvertBooleanCondition', + 'static' => 'getStatic', + 'shape_fill_color_field_name' => 'getShapeFillColorFieldName', + 'shape_border_color_field_name' => 'getShapeBorderColorFieldName', + 'v_alignment' => 'getVAlignment', + 'bold' => 'getBold', + 'shape_border_width' => 'getShapeBorderWidth', + 'comb_number_of_cells' => 'getCombNumberOfCells', + 'shape_border_color' => 'getShapeBorderColor', + 'typeface' => 'getTypeface', + 'comb' => 'getComb', + 'shape_type' => 'getShapeType', + 'display_type' => 'getDisplayType', + 'condition' => 'getCondition', + 'check_color' => 'getCheckColor', + 'multiline_lines' => 'getMultilineLines', + 'multiline' => 'getMultiline', + 'true_text' => 'getTrueText', + 'name' => 'getName', + 'font_size' => 'getFontSize', + 'page' => 'getPage', + 'alignment' => 'getAlignment', + 'max_length' => 'getMaxLength', + 'auto_calculate_max_length' => 'getAutoCalculateMaxLength', + 'color_field_name' => 'getColorFieldName', + 'qrcode_color_field_name' => 'getQrcodeColorFieldName', + 'number_condition_range_min' => 'getNumberConditionRangeMin', + 'hidden' => 'getHidden', + 'color' => 'getColor', + 'check_color_field_required' => 'getCheckColorFieldRequired', + 'combined_field_format' => 'getCombinedFieldFormat', + 'description' => 'getDescription', + 'shape_border_color_field_required' => 'getShapeBorderColorFieldRequired', + 'combined_field_names' => 'getCombinedFieldNames', + 'title' => 'getTitle', + 'number_condition_range_exclusive_min' => 'getNumberConditionRangeExclusiveMin', + 'combined_field_separator' => 'getCombinedFieldSeparator', + 'exclusive_maximum' => 'getExclusiveMaximum', + 'default' => 'getDefault', + 'combined_field_type' => 'getCombinedFieldType', + 'date_time_format' => 'getDateTimeFormat', + 'qrcode_color_field_required' => 'getQrcodeColorFieldRequired', + 'currency' => 'getCurrency', + 'strikethrough' => 'getStrikethrough', + 'false_text' => 'getFalseText', + 'character_spacing' => 'getCharacterSpacing', + 'number_condition_range_max' => 'getNumberConditionRangeMax', + 'background_color' => 'getBackgroundColor', + 'check_color_field_name' => 'getCheckColorFieldName', + 'check_character' => 'getCheckCharacter', + 'rotation' => 'getRotation', + 'option_list' => 'getOptionList', + 'shape_fill_color' => 'getShapeFillColor', + 'string_condition_type' => 'getStringConditionType', + 'shape_fill_color_field_required' => 'getShapeFillColorFieldRequired', + 'include_time' => 'getIncludeTime', + 'decimal_places' => 'getDecimalPlaces', + 'x' => 'getX', + 'width' => 'getWidth', + 'maximum' => 'getMaximum', + 'y' => 'getY', + 'signature_allow_draw' => 'getSignatureAllowDraw', + 'opacity' => 'getOpacity', + 'number_condition_type' => 'getNumberConditionType', + 'minimum' => 'getMinimum', + 'signature_allow_type' => 'getSignatureAllowType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const TYPE_STRING = 'string'; + const TYPE_NUMBER = 'number'; + const TYPE_BOOLEAN = 'boolean'; + const TYPE_DATE = 'date'; + const TYPE_ADDRESS = 'address'; + const TYPE_COUNTRY = 'country'; + const TYPE_EMAIL = 'email'; + const TYPE_URL = 'url'; + const TYPE_IMAGE = 'image'; + const TYPE_SIGNATURE = 'signature'; + const TYPE_BARCODE = 'barcode'; + const TYPE_COMBINED = 'combined'; + const IMAGE_GRAVITY_NORTH_WEST = 'NorthWest'; + const IMAGE_GRAVITY_NORTH = 'North'; + const IMAGE_GRAVITY_NORTH_EAST = 'NorthEast'; + const IMAGE_GRAVITY_WEST = 'West'; + const IMAGE_GRAVITY_CENTER = 'Center'; + const IMAGE_GRAVITY_EAST = 'East'; + const IMAGE_GRAVITY_SOUTH_WEST = 'SouthWest'; + const IMAGE_GRAVITY_SOUTH = 'South'; + const IMAGE_GRAVITY_SOUTH_EAST = 'SouthEast'; + const OVERFLOW_SHRINK_TO_FIT = 'shrink_to_fit'; + const OVERFLOW_TRUNCATE = 'truncate'; + const IMAGE_SCALE_TYPE_FIT = 'fit'; + const IMAGE_SCALE_TYPE_FILL = 'fill'; + const IMAGE_SCALE_TYPE_STRETCH = 'stretch'; + const V_ALIGNMENT_BOTTOM = 'bottom'; + const V_ALIGNMENT_CENTER = 'center'; + const V_ALIGNMENT_TOP = 'top'; + const SHAPE_TYPE_SQUARE = 'square'; + const SHAPE_TYPE_RECTANGLE = 'rectangle'; + const SHAPE_TYPE_CIRCLE = 'circle'; + const SHAPE_TYPE_ELLIPSE = 'ellipse'; + const DISPLAY_TYPE_TEXT = 'text'; + const DISPLAY_TYPE_CHECK = 'check'; + const DISPLAY_TYPE_QRCODE = 'qrcode'; + const DISPLAY_TYPE_BARCODE = 'barcode'; + const DISPLAY_TYPE_IMAGE = 'image'; + const DISPLAY_TYPE_SHAPE = 'shape'; + const ALIGNMENT_LEFT = 'left'; + const ALIGNMENT_CENTER = 'center'; + const ALIGNMENT_RIGHT = 'right'; + const CHECK_CHARACTER__10003 = '✓'; + const CHECK_CHARACTER__10004 = '✔'; + const CHECK_CHARACTER__10006 = '✖'; + const CHECK_CHARACTER__10007 = '✗'; + const CHECK_CHARACTER__10008 = '✘'; + const STRING_CONDITION_TYPE_EQUALS = 'equals'; + const STRING_CONDITION_TYPE_CONTAINS = 'contains'; + const STRING_CONDITION_TYPE_STARTS_WITH = 'starts_with'; + const STRING_CONDITION_TYPE_ENDS_WITH = 'ends_with'; + const STRING_CONDITION_TYPE_REGEX = 'regex'; + const NUMBER_CONDITION_TYPE_EQUALS = 'equals'; + const NUMBER_CONDITION_TYPE_RANGE = 'range'; + const NUMBER_CONDITION_TYPE_GTE = 'gte'; + const NUMBER_CONDITION_TYPE_GT = 'gt'; + const NUMBER_CONDITION_TYPE_LTE = 'lte'; + const NUMBER_CONDITION_TYPE_LT = 'lt'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_STRING, + self::TYPE_NUMBER, + self::TYPE_BOOLEAN, + self::TYPE_DATE, + self::TYPE_ADDRESS, + self::TYPE_COUNTRY, + self::TYPE_EMAIL, + self::TYPE_URL, + self::TYPE_IMAGE, + self::TYPE_SIGNATURE, + self::TYPE_BARCODE, + self::TYPE_COMBINED, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImageGravityAllowableValues() + { + return [ + self::IMAGE_GRAVITY_NORTH_WEST, + self::IMAGE_GRAVITY_NORTH, + self::IMAGE_GRAVITY_NORTH_EAST, + self::IMAGE_GRAVITY_WEST, + self::IMAGE_GRAVITY_CENTER, + self::IMAGE_GRAVITY_EAST, + self::IMAGE_GRAVITY_SOUTH_WEST, + self::IMAGE_GRAVITY_SOUTH, + self::IMAGE_GRAVITY_SOUTH_EAST, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOverflowAllowableValues() + { + return [ + self::OVERFLOW_SHRINK_TO_FIT, + self::OVERFLOW_TRUNCATE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getImageScaleTypeAllowableValues() + { + return [ + self::IMAGE_SCALE_TYPE_FIT, + self::IMAGE_SCALE_TYPE_FILL, + self::IMAGE_SCALE_TYPE_STRETCH, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVAlignmentAllowableValues() + { + return [ + self::V_ALIGNMENT_BOTTOM, + self::V_ALIGNMENT_CENTER, + self::V_ALIGNMENT_TOP, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShapeTypeAllowableValues() + { + return [ + self::SHAPE_TYPE_SQUARE, + self::SHAPE_TYPE_RECTANGLE, + self::SHAPE_TYPE_CIRCLE, + self::SHAPE_TYPE_ELLIPSE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDisplayTypeAllowableValues() + { + return [ + self::DISPLAY_TYPE_TEXT, + self::DISPLAY_TYPE_CHECK, + self::DISPLAY_TYPE_QRCODE, + self::DISPLAY_TYPE_BARCODE, + self::DISPLAY_TYPE_IMAGE, + self::DISPLAY_TYPE_SHAPE, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAlignmentAllowableValues() + { + return [ + self::ALIGNMENT_LEFT, + self::ALIGNMENT_CENTER, + self::ALIGNMENT_RIGHT, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCheckCharacterAllowableValues() + { + return [ + self::CHECK_CHARACTER__10003, + self::CHECK_CHARACTER__10004, + self::CHECK_CHARACTER__10006, + self::CHECK_CHARACTER__10007, + self::CHECK_CHARACTER__10008, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStringConditionTypeAllowableValues() + { + return [ + self::STRING_CONDITION_TYPE_EQUALS, + self::STRING_CONDITION_TYPE_CONTAINS, + self::STRING_CONDITION_TYPE_STARTS_WITH, + self::STRING_CONDITION_TYPE_ENDS_WITH, + self::STRING_CONDITION_TYPE_REGEX, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getNumberConditionTypeAllowableValues() + { + return [ + self::NUMBER_CONDITION_TYPE_EQUALS, + self::NUMBER_CONDITION_TYPE_RANGE, + self::NUMBER_CONDITION_TYPE_GTE, + self::NUMBER_CONDITION_TYPE_GT, + self::NUMBER_CONDITION_TYPE_LTE, + self::NUMBER_CONDITION_TYPE_LT, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['uppercase'] = isset($data['uppercase']) ? $data['uppercase'] : null; + $this->container['background_color_field_name'] = isset($data['background_color_field_name']) ? $data['background_color_field_name'] : null; + $this->container['metadata'] = isset($data['metadata']) ? $data['metadata'] : null; + $this->container['barcode_symbology'] = isset($data['barcode_symbology']) ? $data['barcode_symbology'] : null; + $this->container['min_length'] = isset($data['min_length']) ? $data['min_length'] : null; + $this->container['integer'] = isset($data['integer']) ? $data['integer'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['required'] = isset($data['required']) ? $data['required'] : null; + $this->container['comb_value_offset'] = isset($data['comb_value_offset']) ? $data['comb_value_offset'] : null; + $this->container['image_gravity'] = isset($data['image_gravity']) ? $data['image_gravity'] : null; + $this->container['overflow'] = isset($data['overflow']) ? $data['overflow'] : null; + $this->container['qrcode_color'] = isset($data['qrcode_color']) ? $data['qrcode_color'] : null; + $this->container['color_field_required'] = isset($data['color_field_required']) ? $data['color_field_required'] : null; + $this->container['background_color_field_required'] = isset($data['background_color_field_required']) ? $data['background_color_field_required'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['image_scale_type'] = isset($data['image_scale_type']) ? $data['image_scale_type'] : null; + $this->container['exclusive_minimum'] = isset($data['exclusive_minimum']) ? $data['exclusive_minimum'] : null; + $this->container['height'] = isset($data['height']) ? $data['height'] : null; + $this->container['number_condition_range_exclusive_max'] = isset($data['number_condition_range_exclusive_max']) ? $data['number_condition_range_exclusive_max'] : null; + $this->container['invert_boolean_condition'] = isset($data['invert_boolean_condition']) ? $data['invert_boolean_condition'] : null; + $this->container['static'] = isset($data['static']) ? $data['static'] : null; + $this->container['shape_fill_color_field_name'] = isset($data['shape_fill_color_field_name']) ? $data['shape_fill_color_field_name'] : null; + $this->container['shape_border_color_field_name'] = isset($data['shape_border_color_field_name']) ? $data['shape_border_color_field_name'] : null; + $this->container['v_alignment'] = isset($data['v_alignment']) ? $data['v_alignment'] : null; + $this->container['bold'] = isset($data['bold']) ? $data['bold'] : null; + $this->container['shape_border_width'] = isset($data['shape_border_width']) ? $data['shape_border_width'] : null; + $this->container['comb_number_of_cells'] = isset($data['comb_number_of_cells']) ? $data['comb_number_of_cells'] : null; + $this->container['shape_border_color'] = isset($data['shape_border_color']) ? $data['shape_border_color'] : null; + $this->container['typeface'] = isset($data['typeface']) ? $data['typeface'] : null; + $this->container['comb'] = isset($data['comb']) ? $data['comb'] : null; + $this->container['shape_type'] = isset($data['shape_type']) ? $data['shape_type'] : null; + $this->container['display_type'] = isset($data['display_type']) ? $data['display_type'] : null; + $this->container['condition'] = isset($data['condition']) ? $data['condition'] : null; + $this->container['check_color'] = isset($data['check_color']) ? $data['check_color'] : null; + $this->container['multiline_lines'] = isset($data['multiline_lines']) ? $data['multiline_lines'] : null; + $this->container['multiline'] = isset($data['multiline']) ? $data['multiline'] : null; + $this->container['true_text'] = isset($data['true_text']) ? $data['true_text'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['font_size'] = isset($data['font_size']) ? $data['font_size'] : null; + $this->container['page'] = isset($data['page']) ? $data['page'] : null; + $this->container['alignment'] = isset($data['alignment']) ? $data['alignment'] : null; + $this->container['max_length'] = isset($data['max_length']) ? $data['max_length'] : null; + $this->container['auto_calculate_max_length'] = isset($data['auto_calculate_max_length']) ? $data['auto_calculate_max_length'] : null; + $this->container['color_field_name'] = isset($data['color_field_name']) ? $data['color_field_name'] : null; + $this->container['qrcode_color_field_name'] = isset($data['qrcode_color_field_name']) ? $data['qrcode_color_field_name'] : null; + $this->container['number_condition_range_min'] = isset($data['number_condition_range_min']) ? $data['number_condition_range_min'] : null; + $this->container['hidden'] = isset($data['hidden']) ? $data['hidden'] : null; + $this->container['color'] = isset($data['color']) ? $data['color'] : null; + $this->container['check_color_field_required'] = isset($data['check_color_field_required']) ? $data['check_color_field_required'] : null; + $this->container['combined_field_format'] = isset($data['combined_field_format']) ? $data['combined_field_format'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['shape_border_color_field_required'] = isset($data['shape_border_color_field_required']) ? $data['shape_border_color_field_required'] : null; + $this->container['combined_field_names'] = isset($data['combined_field_names']) ? $data['combined_field_names'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + $this->container['number_condition_range_exclusive_min'] = isset($data['number_condition_range_exclusive_min']) ? $data['number_condition_range_exclusive_min'] : null; + $this->container['combined_field_separator'] = isset($data['combined_field_separator']) ? $data['combined_field_separator'] : null; + $this->container['exclusive_maximum'] = isset($data['exclusive_maximum']) ? $data['exclusive_maximum'] : null; + $this->container['default'] = isset($data['default']) ? $data['default'] : null; + $this->container['combined_field_type'] = isset($data['combined_field_type']) ? $data['combined_field_type'] : null; + $this->container['date_time_format'] = isset($data['date_time_format']) ? $data['date_time_format'] : null; + $this->container['qrcode_color_field_required'] = isset($data['qrcode_color_field_required']) ? $data['qrcode_color_field_required'] : null; + $this->container['currency'] = isset($data['currency']) ? $data['currency'] : null; + $this->container['strikethrough'] = isset($data['strikethrough']) ? $data['strikethrough'] : null; + $this->container['false_text'] = isset($data['false_text']) ? $data['false_text'] : null; + $this->container['character_spacing'] = isset($data['character_spacing']) ? $data['character_spacing'] : null; + $this->container['number_condition_range_max'] = isset($data['number_condition_range_max']) ? $data['number_condition_range_max'] : null; + $this->container['background_color'] = isset($data['background_color']) ? $data['background_color'] : null; + $this->container['check_color_field_name'] = isset($data['check_color_field_name']) ? $data['check_color_field_name'] : null; + $this->container['check_character'] = isset($data['check_character']) ? $data['check_character'] : null; + $this->container['rotation'] = isset($data['rotation']) ? $data['rotation'] : null; + $this->container['option_list'] = isset($data['option_list']) ? $data['option_list'] : null; + $this->container['shape_fill_color'] = isset($data['shape_fill_color']) ? $data['shape_fill_color'] : null; + $this->container['string_condition_type'] = isset($data['string_condition_type']) ? $data['string_condition_type'] : null; + $this->container['shape_fill_color_field_required'] = isset($data['shape_fill_color_field_required']) ? $data['shape_fill_color_field_required'] : null; + $this->container['include_time'] = isset($data['include_time']) ? $data['include_time'] : null; + $this->container['decimal_places'] = isset($data['decimal_places']) ? $data['decimal_places'] : null; + $this->container['x'] = isset($data['x']) ? $data['x'] : null; + $this->container['width'] = isset($data['width']) ? $data['width'] : null; + $this->container['maximum'] = isset($data['maximum']) ? $data['maximum'] : null; + $this->container['y'] = isset($data['y']) ? $data['y'] : null; + $this->container['signature_allow_draw'] = isset($data['signature_allow_draw']) ? $data['signature_allow_draw'] : null; + $this->container['opacity'] = isset($data['opacity']) ? $data['opacity'] : null; + $this->container['number_condition_type'] = isset($data['number_condition_type']) ? $data['number_condition_type'] : null; + $this->container['minimum'] = isset($data['minimum']) ? $data['minimum'] : null; + $this->container['signature_allow_type'] = isset($data['signature_allow_type']) ? $data['signature_allow_type'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getImageGravityAllowableValues(); + if (!is_null($this->container['image_gravity']) && !in_array($this->container['image_gravity'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'image_gravity', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getOverflowAllowableValues(); + if (!is_null($this->container['overflow']) && !in_array($this->container['overflow'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'overflow', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['id']) && ($this->container['id'] < 0)) { + $invalidProperties[] = "invalid value for 'id', must be bigger than or equal to 0."; + } + + $allowedValues = $this->getImageScaleTypeAllowableValues(); + if (!is_null($this->container['image_scale_type']) && !in_array($this->container['image_scale_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'image_scale_type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['height']) && ($this->container['height'] < 0)) { + $invalidProperties[] = "invalid value for 'height', must be bigger than or equal to 0."; + } + + $allowedValues = $this->getVAlignmentAllowableValues(); + if (!is_null($this->container['v_alignment']) && !in_array($this->container['v_alignment'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'v_alignment', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['shape_border_width']) && ($this->container['shape_border_width'] < 0)) { + $invalidProperties[] = "invalid value for 'shape_border_width', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['comb_number_of_cells']) && ($this->container['comb_number_of_cells'] < 0)) { + $invalidProperties[] = "invalid value for 'comb_number_of_cells', must be bigger than or equal to 0."; + } + + $allowedValues = $this->getShapeTypeAllowableValues(); + if (!is_null($this->container['shape_type']) && !in_array($this->container['shape_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'shape_type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDisplayTypeAllowableValues(); + if (!is_null($this->container['display_type']) && !in_array($this->container['display_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'display_type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['multiline_lines']) && ($this->container['multiline_lines'] < 0)) { + $invalidProperties[] = "invalid value for 'multiline_lines', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['font_size']) && ($this->container['font_size'] < 0)) { + $invalidProperties[] = "invalid value for 'font_size', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['page']) && ($this->container['page'] < 1)) { + $invalidProperties[] = "invalid value for 'page', must be bigger than or equal to 1."; + } + + $allowedValues = $this->getAlignmentAllowableValues(); + if (!is_null($this->container['alignment']) && !in_array($this->container['alignment'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'alignment', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getCheckCharacterAllowableValues(); + if (!is_null($this->container['check_character']) && !in_array($this->container['check_character'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'check_character', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['rotation']) && ($this->container['rotation'] > 3.6E+2)) { + $invalidProperties[] = "invalid value for 'rotation', must be smaller than or equal to 3.6E+2."; + } + + if (!is_null($this->container['rotation']) && ($this->container['rotation'] < 0)) { + $invalidProperties[] = "invalid value for 'rotation', must be bigger than or equal to 0."; + } + + $allowedValues = $this->getStringConditionTypeAllowableValues(); + if (!is_null($this->container['string_condition_type']) && !in_array($this->container['string_condition_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'string_condition_type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if (!is_null($this->container['decimal_places']) && ($this->container['decimal_places'] < 0)) { + $invalidProperties[] = "invalid value for 'decimal_places', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['x']) && ($this->container['x'] < 0)) { + $invalidProperties[] = "invalid value for 'x', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['width']) && ($this->container['width'] < 0)) { + $invalidProperties[] = "invalid value for 'width', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['y']) && ($this->container['y'] < 0)) { + $invalidProperties[] = "invalid value for 'y', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['opacity']) && ($this->container['opacity'] > 1)) { + $invalidProperties[] = "invalid value for 'opacity', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['opacity']) && ($this->container['opacity'] < 0)) { + $invalidProperties[] = "invalid value for 'opacity', must be bigger than or equal to 0."; + } + + $allowedValues = $this->getNumberConditionTypeAllowableValues(); + if (!is_null($this->container['number_condition_type']) && !in_array($this->container['number_condition_type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'number_condition_type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets uppercase + * + * @return bool|null + */ + public function getUppercase() + { + return $this->container['uppercase']; + } + + /** + * Sets uppercase + * + * @param bool|null $uppercase uppercase + * + * @return $this + */ + public function setUppercase($uppercase) + { + $this->container['uppercase'] = $uppercase; + + return $this; + } + + /** + * Gets background_color_field_name + * + * @return string|null + */ + public function getBackgroundColorFieldName() + { + return $this->container['background_color_field_name']; + } + + /** + * Sets background_color_field_name + * + * @param string|null $background_color_field_name background_color_field_name + * + * @return $this + */ + public function setBackgroundColorFieldName($background_color_field_name) + { + $this->container['background_color_field_name'] = $background_color_field_name; + + return $this; + } + + /** + * Gets metadata + * + * @return string|null + */ + public function getMetadata() + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param string|null $metadata metadata + * + * @return $this + */ + public function setMetadata($metadata) + { + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets barcode_symbology + * + * @return string|null + */ + public function getBarcodeSymbology() + { + return $this->container['barcode_symbology']; + } + + /** + * Sets barcode_symbology + * + * @param string|null $barcode_symbology barcode_symbology + * + * @return $this + */ + public function setBarcodeSymbology($barcode_symbology) + { + $this->container['barcode_symbology'] = $barcode_symbology; + + return $this; + } + + /** + * Gets min_length + * + * @return float|null + */ + public function getMinLength() + { + return $this->container['min_length']; + } + + /** + * Sets min_length + * + * @param float|null $min_length min_length + * + * @return $this + */ + public function setMinLength($min_length) + { + $this->container['min_length'] = $min_length; + + return $this; + } + + /** + * Gets integer + * + * @return bool|null + */ + public function getInteger() + { + return $this->container['integer']; + } + + /** + * Sets integer + * + * @param bool|null $integer integer + * + * @return $this + */ + public function setInteger($integer) + { + $this->container['integer'] = $integer; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type type + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($type) && !in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets required + * + * @return bool|null + */ + public function getRequired() + { + return $this->container['required']; + } + + /** + * Sets required + * + * @param bool|null $required required + * + * @return $this + */ + public function setRequired($required) + { + $this->container['required'] = $required; + + return $this; + } + + /** + * Gets comb_value_offset + * + * @return float|null + */ + public function getCombValueOffset() + { + return $this->container['comb_value_offset']; + } + + /** + * Sets comb_value_offset + * + * @param float|null $comb_value_offset comb_value_offset + * + * @return $this + */ + public function setCombValueOffset($comb_value_offset) + { + $this->container['comb_value_offset'] = $comb_value_offset; + + return $this; + } + + /** + * Gets image_gravity + * + * @return string|null + */ + public function getImageGravity() + { + return $this->container['image_gravity']; + } + + /** + * Sets image_gravity + * + * @param string|null $image_gravity image_gravity + * + * @return $this + */ + public function setImageGravity($image_gravity) + { + $allowedValues = $this->getImageGravityAllowableValues(); + if (!is_null($image_gravity) && !in_array($image_gravity, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'image_gravity', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['image_gravity'] = $image_gravity; + + return $this; + } + + /** + * Gets overflow + * + * @return string|null + */ + public function getOverflow() + { + return $this->container['overflow']; + } + + /** + * Sets overflow + * + * @param string|null $overflow overflow + * + * @return $this + */ + public function setOverflow($overflow) + { + $allowedValues = $this->getOverflowAllowableValues(); + if (!is_null($overflow) && !in_array($overflow, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'overflow', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['overflow'] = $overflow; + + return $this; + } + + /** + * Gets qrcode_color + * + * @return string|null + */ + public function getQrcodeColor() + { + return $this->container['qrcode_color']; + } + + /** + * Sets qrcode_color + * + * @param string|null $qrcode_color qrcode_color + * + * @return $this + */ + public function setQrcodeColor($qrcode_color) + { + $this->container['qrcode_color'] = $qrcode_color; + + return $this; + } + + /** + * Gets color_field_required + * + * @return bool|null + */ + public function getColorFieldRequired() + { + return $this->container['color_field_required']; + } + + /** + * Sets color_field_required + * + * @param bool|null $color_field_required color_field_required + * + * @return $this + */ + public function setColorFieldRequired($color_field_required) + { + $this->container['color_field_required'] = $color_field_required; + + return $this; + } + + /** + * Gets background_color_field_required + * + * @return bool|null + */ + public function getBackgroundColorFieldRequired() + { + return $this->container['background_color_field_required']; + } + + /** + * Sets background_color_field_required + * + * @param bool|null $background_color_field_required background_color_field_required + * + * @return $this + */ + public function setBackgroundColorFieldRequired($background_color_field_required) + { + $this->container['background_color_field_required'] = $background_color_field_required; + + return $this; + } + + /** + * Gets id + * + * @return float|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param float|null $id id + * + * @return $this + */ + public function setId($id) + { + + if (!is_null($id) && ($id < 0)) { + throw new \InvalidArgumentException('invalid value for $id when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets image_scale_type + * + * @return string|null + */ + public function getImageScaleType() + { + return $this->container['image_scale_type']; + } + + /** + * Sets image_scale_type + * + * @param string|null $image_scale_type image_scale_type + * + * @return $this + */ + public function setImageScaleType($image_scale_type) + { + $allowedValues = $this->getImageScaleTypeAllowableValues(); + if (!is_null($image_scale_type) && !in_array($image_scale_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'image_scale_type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['image_scale_type'] = $image_scale_type; + + return $this; + } + + /** + * Gets exclusive_minimum + * + * @return bool|null + */ + public function getExclusiveMinimum() + { + return $this->container['exclusive_minimum']; + } + + /** + * Sets exclusive_minimum + * + * @param bool|null $exclusive_minimum exclusive_minimum + * + * @return $this + */ + public function setExclusiveMinimum($exclusive_minimum) + { + $this->container['exclusive_minimum'] = $exclusive_minimum; + + return $this; + } + + /** + * Gets height + * + * @return float|null + */ + public function getHeight() + { + return $this->container['height']; + } + + /** + * Sets height + * + * @param float|null $height height + * + * @return $this + */ + public function setHeight($height) + { + + if (!is_null($height) && ($height < 0)) { + throw new \InvalidArgumentException('invalid value for $height when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['height'] = $height; + + return $this; + } + + /** + * Gets number_condition_range_exclusive_max + * + * @return bool|null + */ + public function getNumberConditionRangeExclusiveMax() + { + return $this->container['number_condition_range_exclusive_max']; + } + + /** + * Sets number_condition_range_exclusive_max + * + * @param bool|null $number_condition_range_exclusive_max number_condition_range_exclusive_max + * + * @return $this + */ + public function setNumberConditionRangeExclusiveMax($number_condition_range_exclusive_max) + { + $this->container['number_condition_range_exclusive_max'] = $number_condition_range_exclusive_max; + + return $this; + } + + /** + * Gets invert_boolean_condition + * + * @return bool|null + */ + public function getInvertBooleanCondition() + { + return $this->container['invert_boolean_condition']; + } + + /** + * Sets invert_boolean_condition + * + * @param bool|null $invert_boolean_condition invert_boolean_condition + * + * @return $this + */ + public function setInvertBooleanCondition($invert_boolean_condition) + { + $this->container['invert_boolean_condition'] = $invert_boolean_condition; + + return $this; + } + + /** + * Gets static + * + * @return bool|null + */ + public function getStatic() + { + return $this->container['static']; + } + + /** + * Sets static + * + * @param bool|null $static static + * + * @return $this + */ + public function setStatic($static) + { + $this->container['static'] = $static; + + return $this; + } + + /** + * Gets shape_fill_color_field_name + * + * @return string|null + */ + public function getShapeFillColorFieldName() + { + return $this->container['shape_fill_color_field_name']; + } + + /** + * Sets shape_fill_color_field_name + * + * @param string|null $shape_fill_color_field_name shape_fill_color_field_name + * + * @return $this + */ + public function setShapeFillColorFieldName($shape_fill_color_field_name) + { + $this->container['shape_fill_color_field_name'] = $shape_fill_color_field_name; + + return $this; + } + + /** + * Gets shape_border_color_field_name + * + * @return string|null + */ + public function getShapeBorderColorFieldName() + { + return $this->container['shape_border_color_field_name']; + } + + /** + * Sets shape_border_color_field_name + * + * @param string|null $shape_border_color_field_name shape_border_color_field_name + * + * @return $this + */ + public function setShapeBorderColorFieldName($shape_border_color_field_name) + { + $this->container['shape_border_color_field_name'] = $shape_border_color_field_name; + + return $this; + } + + /** + * Gets v_alignment + * + * @return string|null + */ + public function getVAlignment() + { + return $this->container['v_alignment']; + } + + /** + * Sets v_alignment + * + * @param string|null $v_alignment v_alignment + * + * @return $this + */ + public function setVAlignment($v_alignment) + { + $allowedValues = $this->getVAlignmentAllowableValues(); + if (!is_null($v_alignment) && !in_array($v_alignment, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'v_alignment', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['v_alignment'] = $v_alignment; + + return $this; + } + + /** + * Gets bold + * + * @return bool|null + */ + public function getBold() + { + return $this->container['bold']; + } + + /** + * Sets bold + * + * @param bool|null $bold bold + * + * @return $this + */ + public function setBold($bold) + { + $this->container['bold'] = $bold; + + return $this; + } + + /** + * Gets shape_border_width + * + * @return float|null + */ + public function getShapeBorderWidth() + { + return $this->container['shape_border_width']; + } + + /** + * Sets shape_border_width + * + * @param float|null $shape_border_width shape_border_width + * + * @return $this + */ + public function setShapeBorderWidth($shape_border_width) + { + + if (!is_null($shape_border_width) && ($shape_border_width < 0)) { + throw new \InvalidArgumentException('invalid value for $shape_border_width when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['shape_border_width'] = $shape_border_width; + + return $this; + } + + /** + * Gets comb_number_of_cells + * + * @return float|null + */ + public function getCombNumberOfCells() + { + return $this->container['comb_number_of_cells']; + } + + /** + * Sets comb_number_of_cells + * + * @param float|null $comb_number_of_cells comb_number_of_cells + * + * @return $this + */ + public function setCombNumberOfCells($comb_number_of_cells) + { + + if (!is_null($comb_number_of_cells) && ($comb_number_of_cells < 0)) { + throw new \InvalidArgumentException('invalid value for $comb_number_of_cells when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['comb_number_of_cells'] = $comb_number_of_cells; + + return $this; + } + + /** + * Gets shape_border_color + * + * @return string|null + */ + public function getShapeBorderColor() + { + return $this->container['shape_border_color']; + } + + /** + * Sets shape_border_color + * + * @param string|null $shape_border_color shape_border_color + * + * @return $this + */ + public function setShapeBorderColor($shape_border_color) + { + $this->container['shape_border_color'] = $shape_border_color; + + return $this; + } + + /** + * Gets typeface + * + * @return string|null + */ + public function getTypeface() + { + return $this->container['typeface']; + } + + /** + * Sets typeface + * + * @param string|null $typeface typeface + * + * @return $this + */ + public function setTypeface($typeface) + { + $this->container['typeface'] = $typeface; + + return $this; + } + + /** + * Gets comb + * + * @return bool|null + */ + public function getComb() + { + return $this->container['comb']; + } + + /** + * Sets comb + * + * @param bool|null $comb comb + * + * @return $this + */ + public function setComb($comb) + { + $this->container['comb'] = $comb; + + return $this; + } + + /** + * Gets shape_type + * + * @return string|null + */ + public function getShapeType() + { + return $this->container['shape_type']; + } + + /** + * Sets shape_type + * + * @param string|null $shape_type shape_type + * + * @return $this + */ + public function setShapeType($shape_type) + { + $allowedValues = $this->getShapeTypeAllowableValues(); + if (!is_null($shape_type) && !in_array($shape_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'shape_type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['shape_type'] = $shape_type; + + return $this; + } + + /** + * Gets display_type + * + * @return string|null + */ + public function getDisplayType() + { + return $this->container['display_type']; + } + + /** + * Sets display_type + * + * @param string|null $display_type display_type + * + * @return $this + */ + public function setDisplayType($display_type) + { + $allowedValues = $this->getDisplayTypeAllowableValues(); + if (!is_null($display_type) && !in_array($display_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'display_type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['display_type'] = $display_type; + + return $this; + } + + /** + * Gets condition + * + * @return string|null + */ + public function getCondition() + { + return $this->container['condition']; + } + + /** + * Sets condition + * + * @param string|null $condition condition + * + * @return $this + */ + public function setCondition($condition) + { + $this->container['condition'] = $condition; + + return $this; + } + + /** + * Gets check_color + * + * @return string|null + */ + public function getCheckColor() + { + return $this->container['check_color']; + } + + /** + * Sets check_color + * + * @param string|null $check_color check_color + * + * @return $this + */ + public function setCheckColor($check_color) + { + $this->container['check_color'] = $check_color; + + return $this; + } + + /** + * Gets multiline_lines + * + * @return float|null + */ + public function getMultilineLines() + { + return $this->container['multiline_lines']; + } + + /** + * Sets multiline_lines + * + * @param float|null $multiline_lines multiline_lines + * + * @return $this + */ + public function setMultilineLines($multiline_lines) + { + + if (!is_null($multiline_lines) && ($multiline_lines < 0)) { + throw new \InvalidArgumentException('invalid value for $multiline_lines when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['multiline_lines'] = $multiline_lines; + + return $this; + } + + /** + * Gets multiline + * + * @return bool|null + */ + public function getMultiline() + { + return $this->container['multiline']; + } + + /** + * Sets multiline + * + * @param bool|null $multiline multiline + * + * @return $this + */ + public function setMultiline($multiline) + { + $this->container['multiline'] = $multiline; + + return $this; + } + + /** + * Gets true_text + * + * @return string|null + */ + public function getTrueText() + { + return $this->container['true_text']; + } + + /** + * Sets true_text + * + * @param string|null $true_text true_text + * + * @return $this + */ + public function setTrueText($true_text) + { + $this->container['true_text'] = $true_text; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets font_size + * + * @return float|null + */ + public function getFontSize() + { + return $this->container['font_size']; + } + + /** + * Sets font_size + * + * @param float|null $font_size font_size + * + * @return $this + */ + public function setFontSize($font_size) + { + + if (!is_null($font_size) && ($font_size < 0)) { + throw new \InvalidArgumentException('invalid value for $font_size when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['font_size'] = $font_size; + + return $this; + } + + /** + * Gets page + * + * @return float|null + */ + public function getPage() + { + return $this->container['page']; + } + + /** + * Sets page + * + * @param float|null $page page + * + * @return $this + */ + public function setPage($page) + { + + if (!is_null($page) && ($page < 1)) { + throw new \InvalidArgumentException('invalid value for $page when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 1.'); + } + + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets alignment + * + * @return string|null + */ + public function getAlignment() + { + return $this->container['alignment']; + } + + /** + * Sets alignment + * + * @param string|null $alignment alignment + * + * @return $this + */ + public function setAlignment($alignment) + { + $allowedValues = $this->getAlignmentAllowableValues(); + if (!is_null($alignment) && !in_array($alignment, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'alignment', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['alignment'] = $alignment; + + return $this; + } + + /** + * Gets max_length + * + * @return float|null + */ + public function getMaxLength() + { + return $this->container['max_length']; + } + + /** + * Sets max_length + * + * @param float|null $max_length max_length + * + * @return $this + */ + public function setMaxLength($max_length) + { + $this->container['max_length'] = $max_length; + + return $this; + } + + /** + * Gets auto_calculate_max_length + * + * @return bool|null + */ + public function getAutoCalculateMaxLength() + { + return $this->container['auto_calculate_max_length']; + } + + /** + * Sets auto_calculate_max_length + * + * @param bool|null $auto_calculate_max_length auto_calculate_max_length + * + * @return $this + */ + public function setAutoCalculateMaxLength($auto_calculate_max_length) + { + $this->container['auto_calculate_max_length'] = $auto_calculate_max_length; + + return $this; + } + + /** + * Gets color_field_name + * + * @return string|null + */ + public function getColorFieldName() + { + return $this->container['color_field_name']; + } + + /** + * Sets color_field_name + * + * @param string|null $color_field_name color_field_name + * + * @return $this + */ + public function setColorFieldName($color_field_name) + { + $this->container['color_field_name'] = $color_field_name; + + return $this; + } + + /** + * Gets qrcode_color_field_name + * + * @return string|null + */ + public function getQrcodeColorFieldName() + { + return $this->container['qrcode_color_field_name']; + } + + /** + * Sets qrcode_color_field_name + * + * @param string|null $qrcode_color_field_name qrcode_color_field_name + * + * @return $this + */ + public function setQrcodeColorFieldName($qrcode_color_field_name) + { + $this->container['qrcode_color_field_name'] = $qrcode_color_field_name; + + return $this; + } + + /** + * Gets number_condition_range_min + * + * @return float|null + */ + public function getNumberConditionRangeMin() + { + return $this->container['number_condition_range_min']; + } + + /** + * Sets number_condition_range_min + * + * @param float|null $number_condition_range_min number_condition_range_min + * + * @return $this + */ + public function setNumberConditionRangeMin($number_condition_range_min) + { + $this->container['number_condition_range_min'] = $number_condition_range_min; + + return $this; + } + + /** + * Gets hidden + * + * @return bool|null + */ + public function getHidden() + { + return $this->container['hidden']; + } + + /** + * Sets hidden + * + * @param bool|null $hidden hidden + * + * @return $this + */ + public function setHidden($hidden) + { + $this->container['hidden'] = $hidden; + + return $this; + } + + /** + * Gets color + * + * @return string|null + */ + public function getColor() + { + return $this->container['color']; + } + + /** + * Sets color + * + * @param string|null $color color + * + * @return $this + */ + public function setColor($color) + { + $this->container['color'] = $color; + + return $this; + } + + /** + * Gets check_color_field_required + * + * @return bool|null + */ + public function getCheckColorFieldRequired() + { + return $this->container['check_color_field_required']; + } + + /** + * Sets check_color_field_required + * + * @param bool|null $check_color_field_required check_color_field_required + * + * @return $this + */ + public function setCheckColorFieldRequired($check_color_field_required) + { + $this->container['check_color_field_required'] = $check_color_field_required; + + return $this; + } + + /** + * Gets combined_field_format + * + * @return string|null + */ + public function getCombinedFieldFormat() + { + return $this->container['combined_field_format']; + } + + /** + * Sets combined_field_format + * + * @param string|null $combined_field_format combined_field_format + * + * @return $this + */ + public function setCombinedFieldFormat($combined_field_format) + { + $this->container['combined_field_format'] = $combined_field_format; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets shape_border_color_field_required + * + * @return bool|null + */ + public function getShapeBorderColorFieldRequired() + { + return $this->container['shape_border_color_field_required']; + } + + /** + * Sets shape_border_color_field_required + * + * @param bool|null $shape_border_color_field_required shape_border_color_field_required + * + * @return $this + */ + public function setShapeBorderColorFieldRequired($shape_border_color_field_required) + { + $this->container['shape_border_color_field_required'] = $shape_border_color_field_required; + + return $this; + } + + /** + * Gets combined_field_names + * + * @return string|null + */ + public function getCombinedFieldNames() + { + return $this->container['combined_field_names']; + } + + /** + * Sets combined_field_names + * + * @param string|null $combined_field_names combined_field_names + * + * @return $this + */ + public function setCombinedFieldNames($combined_field_names) + { + $this->container['combined_field_names'] = $combined_field_names; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title title + * + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets number_condition_range_exclusive_min + * + * @return bool|null + */ + public function getNumberConditionRangeExclusiveMin() + { + return $this->container['number_condition_range_exclusive_min']; + } + + /** + * Sets number_condition_range_exclusive_min + * + * @param bool|null $number_condition_range_exclusive_min number_condition_range_exclusive_min + * + * @return $this + */ + public function setNumberConditionRangeExclusiveMin($number_condition_range_exclusive_min) + { + $this->container['number_condition_range_exclusive_min'] = $number_condition_range_exclusive_min; + + return $this; + } + + /** + * Gets combined_field_separator + * + * @return string|null + */ + public function getCombinedFieldSeparator() + { + return $this->container['combined_field_separator']; + } + + /** + * Sets combined_field_separator + * + * @param string|null $combined_field_separator combined_field_separator + * + * @return $this + */ + public function setCombinedFieldSeparator($combined_field_separator) + { + $this->container['combined_field_separator'] = $combined_field_separator; + + return $this; + } + + /** + * Gets exclusive_maximum + * + * @return bool|null + */ + public function getExclusiveMaximum() + { + return $this->container['exclusive_maximum']; + } + + /** + * Sets exclusive_maximum + * + * @param bool|null $exclusive_maximum exclusive_maximum + * + * @return $this + */ + public function setExclusiveMaximum($exclusive_maximum) + { + $this->container['exclusive_maximum'] = $exclusive_maximum; + + return $this; + } + + /** + * Gets default + * + * @return string|null + */ + public function getDefault() + { + return $this->container['default']; + } + + /** + * Sets default + * + * @param string|null $default default + * + * @return $this + */ + public function setDefault($default) + { + $this->container['default'] = $default; + + return $this; + } + + /** + * Gets combined_field_type + * + * @return string|null + */ + public function getCombinedFieldType() + { + return $this->container['combined_field_type']; + } + + /** + * Sets combined_field_type + * + * @param string|null $combined_field_type combined_field_type + * + * @return $this + */ + public function setCombinedFieldType($combined_field_type) + { + $this->container['combined_field_type'] = $combined_field_type; + + return $this; + } + + /** + * Gets date_time_format + * + * @return string|null + */ + public function getDateTimeFormat() + { + return $this->container['date_time_format']; + } + + /** + * Sets date_time_format + * + * @param string|null $date_time_format date_time_format + * + * @return $this + */ + public function setDateTimeFormat($date_time_format) + { + $this->container['date_time_format'] = $date_time_format; + + return $this; + } + + /** + * Gets qrcode_color_field_required + * + * @return bool|null + */ + public function getQrcodeColorFieldRequired() + { + return $this->container['qrcode_color_field_required']; + } + + /** + * Sets qrcode_color_field_required + * + * @param bool|null $qrcode_color_field_required qrcode_color_field_required + * + * @return $this + */ + public function setQrcodeColorFieldRequired($qrcode_color_field_required) + { + $this->container['qrcode_color_field_required'] = $qrcode_color_field_required; + + return $this; + } + + /** + * Gets currency + * + * @return bool|null + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param bool|null $currency currency + * + * @return $this + */ + public function setCurrency($currency) + { + $this->container['currency'] = $currency; + + return $this; + } + + /** + * Gets strikethrough + * + * @return bool|null + */ + public function getStrikethrough() + { + return $this->container['strikethrough']; + } + + /** + * Sets strikethrough + * + * @param bool|null $strikethrough strikethrough + * + * @return $this + */ + public function setStrikethrough($strikethrough) + { + $this->container['strikethrough'] = $strikethrough; + + return $this; + } + + /** + * Gets false_text + * + * @return string|null + */ + public function getFalseText() + { + return $this->container['false_text']; + } + + /** + * Sets false_text + * + * @param string|null $false_text false_text + * + * @return $this + */ + public function setFalseText($false_text) + { + $this->container['false_text'] = $false_text; + + return $this; + } + + /** + * Gets character_spacing + * + * @return float|null + */ + public function getCharacterSpacing() + { + return $this->container['character_spacing']; + } + + /** + * Sets character_spacing + * + * @param float|null $character_spacing character_spacing + * + * @return $this + */ + public function setCharacterSpacing($character_spacing) + { + $this->container['character_spacing'] = $character_spacing; + + return $this; + } + + /** + * Gets number_condition_range_max + * + * @return float|null + */ + public function getNumberConditionRangeMax() + { + return $this->container['number_condition_range_max']; + } + + /** + * Sets number_condition_range_max + * + * @param float|null $number_condition_range_max number_condition_range_max + * + * @return $this + */ + public function setNumberConditionRangeMax($number_condition_range_max) + { + $this->container['number_condition_range_max'] = $number_condition_range_max; + + return $this; + } + + /** + * Gets background_color + * + * @return string|null + */ + public function getBackgroundColor() + { + return $this->container['background_color']; + } + + /** + * Sets background_color + * + * @param string|null $background_color background_color + * + * @return $this + */ + public function setBackgroundColor($background_color) + { + $this->container['background_color'] = $background_color; + + return $this; + } + + /** + * Gets check_color_field_name + * + * @return string|null + */ + public function getCheckColorFieldName() + { + return $this->container['check_color_field_name']; + } + + /** + * Sets check_color_field_name + * + * @param string|null $check_color_field_name check_color_field_name + * + * @return $this + */ + public function setCheckColorFieldName($check_color_field_name) + { + $this->container['check_color_field_name'] = $check_color_field_name; + + return $this; + } + + /** + * Gets check_character + * + * @return string|null + */ + public function getCheckCharacter() + { + return $this->container['check_character']; + } + + /** + * Sets check_character + * + * @param string|null $check_character check_character + * + * @return $this + */ + public function setCheckCharacter($check_character) + { + $allowedValues = $this->getCheckCharacterAllowableValues(); + if (!is_null($check_character) && !in_array($check_character, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'check_character', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['check_character'] = $check_character; + + return $this; + } + + /** + * Gets rotation + * + * @return float|null + */ + public function getRotation() + { + return $this->container['rotation']; + } + + /** + * Sets rotation + * + * @param float|null $rotation rotation + * + * @return $this + */ + public function setRotation($rotation) + { + + if (!is_null($rotation) && ($rotation > 3.6E+2)) { + throw new \InvalidArgumentException('invalid value for $rotation when calling TemplatestemplateIdaddFieldsFields., must be smaller than or equal to 3.6E+2.'); + } + if (!is_null($rotation) && ($rotation < 0)) { + throw new \InvalidArgumentException('invalid value for $rotation when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['rotation'] = $rotation; + + return $this; + } + + /** + * Gets option_list + * + * @return string|null + */ + public function getOptionList() + { + return $this->container['option_list']; + } + + /** + * Sets option_list + * + * @param string|null $option_list option_list + * + * @return $this + */ + public function setOptionList($option_list) + { + $this->container['option_list'] = $option_list; + + return $this; + } + + /** + * Gets shape_fill_color + * + * @return string|null + */ + public function getShapeFillColor() + { + return $this->container['shape_fill_color']; + } + + /** + * Sets shape_fill_color + * + * @param string|null $shape_fill_color shape_fill_color + * + * @return $this + */ + public function setShapeFillColor($shape_fill_color) + { + $this->container['shape_fill_color'] = $shape_fill_color; + + return $this; + } + + /** + * Gets string_condition_type + * + * @return string|null + */ + public function getStringConditionType() + { + return $this->container['string_condition_type']; + } + + /** + * Sets string_condition_type + * + * @param string|null $string_condition_type string_condition_type + * + * @return $this + */ + public function setStringConditionType($string_condition_type) + { + $allowedValues = $this->getStringConditionTypeAllowableValues(); + if (!is_null($string_condition_type) && !in_array($string_condition_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'string_condition_type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['string_condition_type'] = $string_condition_type; + + return $this; + } + + /** + * Gets shape_fill_color_field_required + * + * @return bool|null + */ + public function getShapeFillColorFieldRequired() + { + return $this->container['shape_fill_color_field_required']; + } + + /** + * Sets shape_fill_color_field_required + * + * @param bool|null $shape_fill_color_field_required shape_fill_color_field_required + * + * @return $this + */ + public function setShapeFillColorFieldRequired($shape_fill_color_field_required) + { + $this->container['shape_fill_color_field_required'] = $shape_fill_color_field_required; + + return $this; + } + + /** + * Gets include_time + * + * @return bool|null + */ + public function getIncludeTime() + { + return $this->container['include_time']; + } + + /** + * Sets include_time + * + * @param bool|null $include_time include_time + * + * @return $this + */ + public function setIncludeTime($include_time) + { + $this->container['include_time'] = $include_time; + + return $this; + } + + /** + * Gets decimal_places + * + * @return float|null + */ + public function getDecimalPlaces() + { + return $this->container['decimal_places']; + } + + /** + * Sets decimal_places + * + * @param float|null $decimal_places decimal_places + * + * @return $this + */ + public function setDecimalPlaces($decimal_places) + { + + if (!is_null($decimal_places) && ($decimal_places < 0)) { + throw new \InvalidArgumentException('invalid value for $decimal_places when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['decimal_places'] = $decimal_places; + + return $this; + } + + /** + * Gets x + * + * @return float|null + */ + public function getX() + { + return $this->container['x']; + } + + /** + * Sets x + * + * @param float|null $x x + * + * @return $this + */ + public function setX($x) + { + + if (!is_null($x) && ($x < 0)) { + throw new \InvalidArgumentException('invalid value for $x when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['x'] = $x; + + return $this; + } + + /** + * Gets width + * + * @return float|null + */ + public function getWidth() + { + return $this->container['width']; + } + + /** + * Sets width + * + * @param float|null $width width + * + * @return $this + */ + public function setWidth($width) + { + + if (!is_null($width) && ($width < 0)) { + throw new \InvalidArgumentException('invalid value for $width when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['width'] = $width; + + return $this; + } + + /** + * Gets maximum + * + * @return float|null + */ + public function getMaximum() + { + return $this->container['maximum']; + } + + /** + * Sets maximum + * + * @param float|null $maximum maximum + * + * @return $this + */ + public function setMaximum($maximum) + { + $this->container['maximum'] = $maximum; + + return $this; + } + + /** + * Gets y + * + * @return float|null + */ + public function getY() + { + return $this->container['y']; + } + + /** + * Sets y + * + * @param float|null $y y + * + * @return $this + */ + public function setY($y) + { + + if (!is_null($y) && ($y < 0)) { + throw new \InvalidArgumentException('invalid value for $y when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['y'] = $y; + + return $this; + } + + /** + * Gets signature_allow_draw + * + * @return bool|null + */ + public function getSignatureAllowDraw() + { + return $this->container['signature_allow_draw']; + } + + /** + * Sets signature_allow_draw + * + * @param bool|null $signature_allow_draw signature_allow_draw + * + * @return $this + */ + public function setSignatureAllowDraw($signature_allow_draw) + { + $this->container['signature_allow_draw'] = $signature_allow_draw; + + return $this; + } + + /** + * Gets opacity + * + * @return float|null + */ + public function getOpacity() + { + return $this->container['opacity']; + } + + /** + * Sets opacity + * + * @param float|null $opacity opacity + * + * @return $this + */ + public function setOpacity($opacity) + { + + if (!is_null($opacity) && ($opacity > 1)) { + throw new \InvalidArgumentException('invalid value for $opacity when calling TemplatestemplateIdaddFieldsFields., must be smaller than or equal to 1.'); + } + if (!is_null($opacity) && ($opacity < 0)) { + throw new \InvalidArgumentException('invalid value for $opacity when calling TemplatestemplateIdaddFieldsFields., must be bigger than or equal to 0.'); + } + + $this->container['opacity'] = $opacity; + + return $this; + } + + /** + * Gets number_condition_type + * + * @return string|null + */ + public function getNumberConditionType() + { + return $this->container['number_condition_type']; + } + + /** + * Sets number_condition_type + * + * @param string|null $number_condition_type number_condition_type + * + * @return $this + */ + public function setNumberConditionType($number_condition_type) + { + $allowedValues = $this->getNumberConditionTypeAllowableValues(); + if (!is_null($number_condition_type) && !in_array($number_condition_type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'number_condition_type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['number_condition_type'] = $number_condition_type; + + return $this; + } + + /** + * Gets minimum + * + * @return float|null + */ + public function getMinimum() + { + return $this->container['minimum']; + } + + /** + * Sets minimum + * + * @param float|null $minimum minimum + * + * @return $this + */ + public function setMinimum($minimum) + { + $this->container['minimum'] = $minimum; + + return $this; + } + + /** + * Gets signature_allow_type + * + * @return bool|null + */ + public function getSignatureAllowType() + { + return $this->container['signature_allow_type']; + } + + /** + * Sets signature_allow_type + * + * @param bool|null $signature_allow_type signature_allow_type + * + * @return $this + */ + public function setSignatureAllowType($signature_allow_type) + { + $this->container['signature_allow_type'] = $signature_allow_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} + + diff --git a/lib/Model/UpdateTemplateData.php b/lib/Model/UpdateTemplateData.php index db9e74d..0389be4 100644 --- a/lib/Model/UpdateTemplateData.php +++ b/lib/Model/UpdateTemplateData.php @@ -57,7 +57,7 @@ class UpdateTemplateData implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'template' => '\DocSpring\Model\TemplatestemplateIdTemplate' + 'template' => '\DocSpring\Model\TemplateData' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets template * - * @return \DocSpring\Model\TemplatestemplateIdTemplate + * @return \DocSpring\Model\TemplateData */ public function getTemplate() { @@ -220,7 +220,7 @@ public function getTemplate() /** * Sets template * - * @param \DocSpring\Model\TemplatestemplateIdTemplate $template template + * @param \DocSpring\Model\TemplateData $template template * * @return $this */ diff --git a/lib/Model/TemplatesdesccachedUploadTemplate.php b/lib/Model/UploadTemplateData.php similarity index 97% rename from lib/Model/TemplatesdesccachedUploadTemplate.php rename to lib/Model/UploadTemplateData.php index af5c402..e2a2d1a 100644 --- a/lib/Model/TemplatesdesccachedUploadTemplate.php +++ b/lib/Model/UploadTemplateData.php @@ -1,6 +1,6 @@ 'string', 'expire_after' => 'float', 'allow_additional_properties' => 'bool', - 'document' => '\DocSpring\Model\TemplatesdesccachedUploadTemplateDocument', + 'document' => '\DocSpring\Model\UploadTemplateDataDocument', 'description' => 'string', 'public_submissions' => 'bool', 'slack_webhook_url' => 'string', @@ -486,7 +486,7 @@ public function setAllowAdditionalProperties($allow_additional_properties) /** * Gets document * - * @return \DocSpring\Model\TemplatesdesccachedUploadTemplateDocument|null + * @return \DocSpring\Model\UploadTemplateDataDocument|null */ public function getDocument() { @@ -496,7 +496,7 @@ public function getDocument() /** * Sets document * - * @param \DocSpring\Model\TemplatesdesccachedUploadTemplateDocument|null $document document + * @param \DocSpring\Model\UploadTemplateDataDocument|null $document document * * @return $this */ diff --git a/lib/Model/TemplatesdesccachedUploadTemplateDocument.php b/lib/Model/UploadTemplateDataDocument.php similarity index 93% rename from lib/Model/TemplatesdesccachedUploadTemplateDocument.php rename to lib/Model/UploadTemplateDataDocument.php index 8528d47..3864a61 100644 --- a/lib/Model/TemplatesdesccachedUploadTemplateDocument.php +++ b/lib/Model/UploadTemplateDataDocument.php @@ -1,6 +1,6 @@ '\DocSpring\Model\TemplatesdesccachedUploadTemplateDocumentMetadata', + 'metadata' => '\DocSpring\Model\UploadTemplateDataDocumentMetadata', 'id' => 'string', 'storage' => 'string' ]; @@ -240,7 +240,7 @@ public function valid() /** * Gets metadata * - * @return \DocSpring\Model\TemplatesdesccachedUploadTemplateDocumentMetadata|null + * @return \DocSpring\Model\UploadTemplateDataDocumentMetadata|null */ public function getMetadata() { @@ -250,7 +250,7 @@ public function getMetadata() /** * Sets metadata * - * @param \DocSpring\Model\TemplatesdesccachedUploadTemplateDocumentMetadata|null $metadata metadata + * @param \DocSpring\Model\UploadTemplateDataDocumentMetadata|null $metadata metadata * * @return $this */ diff --git a/lib/Model/TemplatesdesccachedUploadTemplateDocumentMetadata.php b/lib/Model/UploadTemplateDataDocumentMetadata.php similarity index 96% rename from lib/Model/TemplatesdesccachedUploadTemplateDocumentMetadata.php rename to lib/Model/UploadTemplateDataDocumentMetadata.php index 382289c..16d346f 100644 --- a/lib/Model/TemplatesdesccachedUploadTemplateDocumentMetadata.php +++ b/lib/Model/UploadTemplateDataDocumentMetadata.php @@ -1,6 +1,6 @@ docspring; - $create_template_data = new \DocSpring\Model\CreateTemplateData1([ + $create_template_data = new \DocSpring\Model\CreateHtmlTemplateData([ "template" => [ "template_type" => "html", "name" => "Test HTML Template", @@ -332,7 +332,7 @@ public function testCreateHTMLTemplate() "header_html" => "Test Header HTML", "footer_html" => "Test Header HTML", ] - ]); // \DocSpring\Model\CreateTemplateData1 | + ]); // \DocSpring\Model\CreateHtmlTemplateData | $response = $this->docspring->createHTMLTemplate($create_template_data); $this->assertStringStartsWith('tpl_', $response->getId()); $this->assertEquals('Test HTML Template', $response->getName()); diff --git a/test/Api/PDFApiTest.php.original b/test/Api/PDFApiTest.php.original index 43cad70..2064b69 100644 --- a/test/Api/PDFApiTest.php.original +++ b/test/Api/PDFApiTest.php.original @@ -83,6 +83,19 @@ class PDFApiTest extends \PHPUnit_Framework_TestCase { } + /** + * Test case for addFieldsToTemplate + * + * Add new fields to a Template. + * + */ + public function testAddFieldsToTemplate() + { + $template_id = tpl_000000000000000002; // string | + $add_fields_data = new \DocSpring\Model\AddFieldsData(); // \DocSpring\Model\AddFieldsData | + $result = $apiInstance->addFieldsToTemplate($template_id, $add_fields_data); + } + /** * Test case for batchGeneratePdfV1 * @@ -176,8 +189,8 @@ class PDFApiTest extends \PHPUnit_Framework_TestCase */ public function testCreateHTMLTemplate() { - $create_template_data1 = new \DocSpring\Model\CreateTemplateData1(); // \DocSpring\Model\CreateTemplateData1 | - $result = $apiInstance->createHTMLTemplate($create_template_data1); + $create_html_template_data = new \DocSpring\Model\CreateHtmlTemplateData(); // \DocSpring\Model\CreateHtmlTemplateData | + $result = $apiInstance->createHTMLTemplate($create_html_template_data); } /** @@ -202,8 +215,8 @@ class PDFApiTest extends \PHPUnit_Framework_TestCase */ public function testCreatePDFTemplateFromUpload() { - $create_template_data = new \DocSpring\Model\CreateTemplateData(); // \DocSpring\Model\CreateTemplateData | - $result = $apiInstance->createPDFTemplateFromUpload($create_template_data); + $create_template_from_upload_data = new \DocSpring\Model\CreateTemplateFromUploadData(); // \DocSpring\Model\CreateTemplateFromUploadData | + $result = $apiInstance->createPDFTemplateFromUpload($create_template_from_upload_data); } /** diff --git a/test/Model/AddFieldsDataTest.php b/test/Model/AddFieldsDataTest.php new file mode 100644 index 0000000..10277d8 --- /dev/null +++ b/test/Model/AddFieldsDataTest.php @@ -0,0 +1,85 @@ +