From 8a2bf886f4b5e19976f2e54b9c64c5bda377514d Mon Sep 17 00:00:00 2001 From: Lars Steen Date: Tue, 29 Jun 2021 11:10:13 +0200 Subject: [PATCH 1/4] Adding PDF template system --- composer.json | 10 +- os2forms_digital_post.info.yml | 8 + os2forms_digital_post.services.yml | 4 + src/Manager/TemplateManager.php | 90 ++++ src/Manager/TemplateManagerInterface.php | 14 + .../DigitalPostWebformHandler.php | 384 ++++++++++++++++++ 6 files changed, 509 insertions(+), 1 deletion(-) create mode 100644 os2forms_digital_post.info.yml create mode 100644 os2forms_digital_post.services.yml create mode 100644 src/Manager/TemplateManager.php create mode 100644 src/Manager/TemplateManagerInterface.php create mode 100644 src/Plugin/WebformHandler/DigitalPostWebformHandler.php diff --git a/composer.json b/composer.json index e6268bc..18cd0a8 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,14 @@ "itk-dev/serviceplatformen": "^1.0", "php-http/guzzle6-adapter": "^2.0.1", "http-interop/http-factory-guzzle": "^1.0.0", - "symfony/property-access": "^4.4" + "symfony/property-access": "^4.4", + "wsdltophp/packagebase": "^5.0", + "dompdf/dompdf": "~0.8.0" + }, + "autoload": { + "Drupal\\os2forms_digital_post\\": "src/" + }, + "require-dev": { + "wsdltophp/packagegenerator": "^4.0" } } diff --git a/os2forms_digital_post.info.yml b/os2forms_digital_post.info.yml new file mode 100644 index 0000000..126f50e --- /dev/null +++ b/os2forms_digital_post.info.yml @@ -0,0 +1,8 @@ +name: 'OS2Forms Digital Post' +type: module +description: 'Provides integration to Print service provided by Serviceplatformen.' +package: 'OS2Forms' +core: 8.x +core_version_requirement: ^8 || ^9 +dependencies: + - 'webform:webform' diff --git a/os2forms_digital_post.services.yml b/os2forms_digital_post.services.yml new file mode 100644 index 0000000..d434907 --- /dev/null +++ b/os2forms_digital_post.services.yml @@ -0,0 +1,4 @@ +services: + os2forms_digital_post.template_manager: + class: Drupal\os2forms_digital_post\Manager\TemplateManager + arguments: ["@config.factory", "@twig", "@twig.loader.filesystem"] diff --git a/src/Manager/TemplateManager.php b/src/Manager/TemplateManager.php new file mode 100644 index 0000000..21b799f --- /dev/null +++ b/src/Manager/TemplateManager.php @@ -0,0 +1,90 @@ +config = $configFactory->get('os2forms_digital_post'); + $filesystemLoader->addPath($this->config->get('path_to_templates')); + $this->twigEnvironment = $twigEnvironment; + } + + /** + * {@inheritDoc} + */ + public function getAvailableTemplates(): array + { + $pathToTemplates = $this->config->get('path_to_templates'); + + $listOfTemplates = []; + + $directoryIterator = new \DirectoryIterator($pathToTemplates); + foreach ($directoryIterator as $fileInfo) { + if (!$fileInfo->isDir() || $fileInfo->isDot()) { + continue; + } + + $listOfTemplates[$fileInfo->getBasename()] = $fileInfo->getBasename(); + } + + return $listOfTemplates; + } + + public function renderHtml(string $template, array $context = []): string { + + $context['logo'] = $this->getPathToBase64EncodedLogo($template); + $pathToTemplate = $template . '/index.html.twig'; + + return $this->twigEnvironment->render($pathToTemplate, $context); + } + + public function renderPdf(string $template, array $context = [], bool $stream = false): string { + + $html = $this->renderHtml($template, $context); + + $domPdf = new Dompdf(); + + $pathToCss = $this->getPathToTemplate($template) . '/styles.css'; + $stylesheet = new Stylesheet($domPdf); + $cssAsString = file_get_contents($pathToCss); + $stylesheet->load_css($cssAsString); + $domPdf->setCss($stylesheet); + + $domPdf->loadHtml($html); + $domPdf->render(); + + if (true === $stream) { + $domPdf->stream(); // Streams PDF to browser + } + + return $domPdf->output(); //Returns PDF as string + } + + private function getPathToBase64EncodedLogo($template): string { + $pathToLogo = $this->getPathToTemplate($template) . '/logo.png'; + + if (!file_exists($pathToLogo)) { + return 'Logo not found!'; + } + + $extension = pathinfo($pathToLogo, PATHINFO_EXTENSION); + $data = file_get_contents($pathToLogo); + $logoBase64 = base64_encode($data); + + return 'data:image/' . $extension . ';base64,' . $logoBase64; + } + + private function getPathToTemplate(string $template): string { + return $this->config->get('path_to_templates') . '/' . $template; + } +} diff --git a/src/Manager/TemplateManagerInterface.php b/src/Manager/TemplateManagerInterface.php new file mode 100644 index 0000000..fd51f87 --- /dev/null +++ b/src/Manager/TemplateManagerInterface.php @@ -0,0 +1,14 @@ +tokenManager = $token_manager; + $this->elementManager = $element_manager; + $this->templateManager = $templateManager; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $container->get('logger.factory'), + $container->get('config.factory'), + $container->get('entity_type.manager'), + $container->get('webform_submission.conditions_validator'), + $container->get('webform.token_manager'), + $container->get('plugin.manager.webform.element'), + $container->get('os2forms_digital_post.template_manager'), + ); + } + + /** + * {@inheritdoc} + */ + public function defaultConfiguration() { + return [ + 'message' => 'This is a custom message.', + 'debug' => FALSE, + ]; + } + + /** + * {@inheritdoc} + */ + public function buildConfigurationForm(array $form, FormStateInterface $form_state) { + $this->getLogger()->debug('This was the form: ' . print_r($this->getWebform()->getElementsDecoded(), true)); + + $allElements = $this->getWebform()->getElementsDecoded(); + $availableElements = []; + + foreach ($allElements as $key => $element) { + $availableElements[$key] = $element['#title']; + } + + $form['blacklist_elements_for_template'] = [ + '#type' => 'select', + '#title' => $this->t('Prevent elements displayed in template'), + '#options' => $availableElements, + '#default_value' => $this->configuration['blacklist_elements_for_template'], + '#multiple' => true, + '#size' => 10, + ]; + + $listOfTemplates = $this->templateManager->getAvailableTemplates(); + + $form['template'] = [ + '#type' => 'select', + '#title' => $this->t('Select template'), + '#options' => $listOfTemplates, + '#default_value' => $this->configuration['template'], + ]; + + $form['channel'] = [ + '#type' => 'select', + '#title' => $this->t('Select channel'), + '#options' => [ + 'D' => $this->t('Digital Post'), +// 'F' => $this->t('Fysisk post'), +// 'A' => $this->t('Automatisk på SP'), +// 'P' => $this->t('Automatisk på Fjern-print'), +// 'S' => $this->t('Nem SMS'), + ], + '#default_value' => $this->configuration['channel'], + ]; + + $form['priority'] = [ + '#type' => 'select', + '#title' => $this->t('Priority'), + '#options' => [ + 'D' => $this->t('Direkte'), +// 'M' => $this->t('Masseforsendelse') + ], + '#default_value' => $this->configuration['priority'], + ]; + + $form['cpr_element'] = [ + '#type' => 'textfield', + '#title' => $this->t('Element in form that contains the CPR number of the recipient'), + '#required' => TRUE, + '#default_value' => $this->configuration['cpr_element'], + ]; + + $form['document_title'] = [ + '#type' => 'textfield', + '#title' => $this->t('Title of document'), + '#required' => TRUE, + '#default_value' => $this->configuration['document_title'], + ]; + + // Development. + $form['development'] = [ + '#type' => 'details', + '#title' => $this->t('Development settings'), + ]; + $form['development']['debug'] = [ + '#type' => 'checkbox', + '#title' => $this->t('Enable debugging'), + '#description' => $this->t('If checked, every handler method invoked will be displayed onscreen to all users.'), + '#return_value' => TRUE, + '#default_value' => $this->configuration['debug'], + ]; + + return $this->setSettingsParents($form); + } + + /** + * {@inheritdoc} + */ + public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { + parent::submitConfigurationForm($form, $form_state); + $this->configuration['channel'] = $form_state->getValue('channel'); + $this->configuration['priority'] = $form_state->getValue('priority'); + $this->configuration['cpr_element'] = $form_state->getValue('cpr_element'); + $this->configuration['document_title'] = $form_state->getValue('document_title'); + $this->configuration['template'] = $form_state->getValue('template'); + $this->configuration['blacklist_elements_for_template'] = $form_state->getValue('blacklist_elements_for_template'); + $this->configuration['debug'] = (bool) $form_state->getValue('debug'); + } + + /** + * {@inheritdoc} + */ + public function alterElements(array &$elements, WebformInterface $webform) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function overrideSettings(array &$settings, WebformSubmissionInterface $webform_submission) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function alterForm(array &$form, FormStateInterface $form_state, WebformSubmissionInterface $webform_submission) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function validateForm(array &$form, FormStateInterface $form_state, WebformSubmissionInterface $webform_submission) { + $this->debug(__FUNCTION__); + if ($value = $form_state->getValue('element')) { + $form_state->setErrorByName('element', $this->t('The element must be empty. You entered %value.', ['%value' => $value])); + } + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, FormStateInterface $form_state, WebformSubmissionInterface $webform_submission) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function confirmForm(array &$form, FormStateInterface $form_state, WebformSubmissionInterface $webform_submission) { +// $message = $this->configuration['message']; +// $message = $this->replaceTokens($message, $this->getWebformSubmission()); +// $this->messenger()->addStatus(Markup::create(Xss::filter($message)), FALSE); + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function preCreate(array &$values) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function postCreate(WebformSubmissionInterface $webform_submission) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function postLoad(WebformSubmissionInterface $webform_submission) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function preDelete(WebformSubmissionInterface $webform_submission) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function postDelete(WebformSubmissionInterface $webform_submission) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function preSave(WebformSubmissionInterface $webform_submission) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function postSave(WebformSubmissionInterface $webform_submission, $update = TRUE) { + $this->debug(__FUNCTION__, $update ? 'update' : 'insert'); + + $elements = []; + $blacklistedElements = $this->configuration['blacklist_elements_for_template']; + $submissionData = $webform_submission->getData(); + foreach ($submissionData as $key => $value) { + + if (array_key_exists($key, $blacklistedElements)) { + continue; + } + + $element = $this->webform->getElement($key); + + $elements[] = [ + 'name' => $element['#title'], + 'value' => $value, + ]; + } + + $context = [ + 'elements' => $elements, + ]; + + if (true === $this->configuration['debug']) { + $this->templateManager->renderPdf($this->configuration['template'], $context, true); + return; + } + + $pdf = $this->templateManager->renderPdf($this->configuration['template'], $context); + + // Base64 encode pdf for digital post service + // Invoke the service + } + + /** + * {@inheritdoc} + */ + public function preprocessConfirmation(array &$variables) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function createHandler() { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function updateHandler() { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function deleteHandler() { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function createElement($key, array $element) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function updateElement($key, array $element, array $original_element) { + $this->debug(__FUNCTION__); + } + + /** + * {@inheritdoc} + */ + public function deleteElement($key, array $element) { + $this->debug(__FUNCTION__); + } + + /** + * Display the invoked plugin method to end user. + * + * @param string $method_name + * The invoked method name. + * @param string $context1 + * Additional parameter passed to the invoked method name. + */ + protected function debug($method_name, $context1 = NULL) { + if (!empty($this->configuration['debug'])) { + $t_args = [ + '@id' => $this->getHandlerId(), + '@class_name' => get_class($this), + '@method_name' => $method_name, + '@context1' => $context1, + ]; + $this->messenger()->addWarning($this->t('Invoked @id: @class_name:@method_name @context1', $t_args), TRUE); + } + } +} From 647be3816f10dfcfd42cda61bbbbaa091d3bfe08 Mon Sep 17 00:00:00 2001 From: Lars Steen Date: Tue, 29 Jun 2021 13:58:03 +0200 Subject: [PATCH 2/4] Adding return statement --- src/Manager/TemplateManager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Manager/TemplateManager.php b/src/Manager/TemplateManager.php index 21b799f..acf7618 100644 --- a/src/Manager/TemplateManager.php +++ b/src/Manager/TemplateManager.php @@ -65,6 +65,7 @@ public function renderPdf(string $template, array $context = [], bool $stream = if (true === $stream) { $domPdf->stream(); // Streams PDF to browser + return ''; } return $domPdf->output(); //Returns PDF as string From 544bea5178a7fbf4fc1fe56c449f6e60f4f62779 Mon Sep 17 00:00:00 2001 From: Lars Steen Date: Tue, 29 Jun 2021 14:14:16 +0200 Subject: [PATCH 3/4] Make form element required and specify channel options --- src/Plugin/WebformHandler/DigitalPostWebformHandler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Plugin/WebformHandler/DigitalPostWebformHandler.php b/src/Plugin/WebformHandler/DigitalPostWebformHandler.php index 98ccd20..89adad7 100644 --- a/src/Plugin/WebformHandler/DigitalPostWebformHandler.php +++ b/src/Plugin/WebformHandler/DigitalPostWebformHandler.php @@ -116,8 +116,13 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta '#title' => $this->t('Select template'), '#options' => $listOfTemplates, '#default_value' => $this->configuration['template'], + '#required' => true, ]; + // The channels available here are required by the + // Digital Post service. For more information see the + // specification for the PrintService (SF1600) on + // Serviceplatformen. $form['channel'] = [ '#type' => 'select', '#title' => $this->t('Select channel'), From 8b1e9ab16b292ac955279e7983e72546b3c3f403 Mon Sep 17 00:00:00 2001 From: Lars Steen Date: Thu, 8 Jul 2021 10:21:06 +0200 Subject: [PATCH 4/4] Initial commit --- README.md | 92 + composer.json | 30 +- .../PrintService/ClassMap.php | 51 + .../PrintService/EnumType/FarveSHKodeType.php | 38 + .../PrintService/EnumType/KanalKodeType.php | 38 + .../PrintService/EnumType/KanalvalgType.php | 59 + .../EnumType/KuvertTypeKodeType.php | 45 + .../EnumType/KvitteringsTypeKodeType.php | 45 + .../EnumType/MeddelelseSvarTypeNavnType.php | 45 + .../EnumType/PostKategoriKodeType.php | 66 + .../PrintService/EnumType/PrioritetType.php | 38 + .../EnumType/SimplexDuplexKodeType.php | 38 + .../PrintService/ServiceType/Afsend.php | 47 + .../PrintService/ServiceType/Spoerg.php | 47 + .../StructType/AuthorityContextType.php | 63 + .../StructType/BilagSamlingType.php | 105 ++ .../PrintService/StructType/BilagType.php | 452 +++++ .../StructType/BrevSPBodyType.php | 127 ++ .../StructType/CallContextType.php | 146 ++ .../CountryIdentificationCodeType.php | 85 + .../StructType/DigitalPostParametreType.php | 259 +++ .../StructType/DokumentParametreType.php | 155 ++ .../PrintService/StructType/ErrorListType.php | 97 ++ .../PrintService/StructType/ErrorType.php | 91 + .../PrintService/StructType/FejlType.php | 146 ++ .../StructType/ForsendelseAfsenderType.php | 54 + .../StructType/ForsendelseIType.php | 413 +++++ .../StructType/ForsendelseModtagerType.php | 85 + .../StructType/InvocationContextType.php | 310 ++++ .../KanalUafhaengigeParametreIType.php | 350 ++++ .../StructType/KontaktOplysningType.php | 1475 +++++++++++++++++ .../StructType/MeddelelseFESDmetadataType.php | 183 ++ .../MeddelelsesFormatObjektType.php | 64 + .../StructType/PostParametreType.php | 202 +++ .../StructType/PrintAfsendBrevRequestType.php | 146 ++ .../PrintAfsendBrevResponseType.php | 57 + .../StructType/PrintParametreType.php | 134 ++ .../PrintSpoergTilmeldingRequestType.php | 146 ++ .../PrintSpoergTilmeldingResponseType.php | 57 + .../StructType/ServiceplatformFaultType.php | 53 + .../StructType/SlutbrugerIdentitetType.php | 187 +++ .../StructType/TilmeldingRequestType.php | 88 + .../StructType/TransaktionsParametreIType.php | 183 ++ generated-sources/PrintService/tutorial.php | 49 + os2forms_digital_post.services.yml | 4 + phpcs.xml.dist | 21 + .../PrintService/PrintServiceMsg.xsd | 50 + .../SF1600_EP_SP1-2/xsd/oio/Aa.xsd | 8 + .../SF1600_EP_SP1-2/xsd/oio/Afsendelse.xsd | 64 + .../xsd/oio/AfsendelseDatoTid.xsd | 5 + .../xsd/oio/AfsendelseIdentifikator.xsd | 13 + .../xsd/oio/AfsendelseModtager.xsd | 5 + .../xsd/oio/AfsendelseTilstandNavn.xsd | 11 + .../xsd/oio/AfsendelseURLreference.xsd | 5 + .../xsd/oio/AfsenderAdresse.xsd | 5 + .../xsd/oio/AfsenderSystemIdentifikator.xsd | 6 + .../xsd/oio/AllokeringsIdentifikator.xsd | 6 + .../SF1600_EP_SP1-2/xsd/oio/Bilag.xsd | 26 + .../xsd/oio/BilagIdentifikator.xsd | 9 + .../SF1600_EP_SP1-2/xsd/oio/BilagNavn.xsd | 9 + .../SF1600_EP_SP1-2/xsd/oio/BilagSamling.xsd | 10 + .../BilagSorteringsIndeksIdentifikator.xsd | 6 + .../SF1600_EP_SP1-2/xsd/oio/BrevDato.xsd | 6 + .../SF1600_EP_SP1-2/xsd/oio/BrugerNavn.xsd | 10 + .../xsd/oio/CPR_CompletePostalLabelText.xsd | 9 + .../CPR_PersonCivilRegistrationIdentifier.xsd | 40 + .../xsd/oio/CPRnummerIdentifikator.xsd | 7 + .../xsd/oio/CVR_CVRnumberIdentifier.xsd | 13 + .../xsd/oio/CVRnummerIdentifikator.xsd | 7 + .../SF1600_EP_SP1-2/xsd/oio/CallContext.xsd | 29 + .../SF1600_EP_SP1-2/xsd/oio/CoNavn.xsd | 8 + .../oio/DKCC_CountryIdentificationCode.xsd | 56 + .../xsd/oio/DKCC_DistrictName.xsd | 19 + .../DKCC_DistrictSubdivisionIdentifier.xsd | 14 + .../xsd/oio/DKCC_FloorIdentifier.xsd | 13 + ...DKCC_MailDeliverySublocationIdentifier.xsd | 14 + .../xsd/oio/DKCC_PostCodeIdentifier.xsd | 13 + .../xsd/oio/DKCC_PostOfficeBoxIdentifier.xsd | 17 + .../oio/DKCC_PostalAddressFifthLineText.xsd | 5 + .../oio/DKCC_PostalAddressFirstLineText.xsd | 5 + .../oio/DKCC_PostalAddressFourthLineText.xsd | 5 + .../oio/DKCC_PostalAddressSecondLineText.xsd | 5 + .../oio/DKCC_PostalAddressSixthLineText.xsd | 5 + .../oio/DKCC_PostalAddressThirdLineText.xsd | 5 + .../xsd/oio/DKCC_StreetBuildingIdentifier.xsd | 13 + .../xsd/oio/DKCC_StreetName.xsd | 14 + .../xsd/oio/DKCC_SuiteIdentifier.xsd | 14 + .../xsd/oio/DigitalPostParametre.xsd | 24 + .../xsd/oio/DokumentParametre.xsd | 18 + .../SF1600_EP_SP1-2/xsd/oio/EnhedTekst.xsd | 9 + .../xsd/oio/FESDaktoerIdentifikator.xsd | 5 + .../xsd/oio/FESDdokumentIdentifikator.xsd | 5 + .../xsd/oio/FESDsagIdentifikator.xsd | 5 + .../FESDsagsklassifikationIdentifikator.xsd | 5 + .../SF1600_EP_SP1-2/xsd/oio/FarveSHKode.xsd | 10 + .../SF1600_EP_SP1-2/xsd/oio/Fejl.xsd | 14 + .../xsd/oio/FejlIdentifikator.xsd | 9 + .../SF1600_EP_SP1-2/xsd/oio/FejlKode.xsd | 10 + .../SF1600_EP_SP1-2/xsd/oio/FejlTekst.xsd | 9 + .../xsd/oio/FejlbeskedTekst.xsd | 8 + .../SF1600_EP_SP1-2/xsd/oio/FilformatNavn.xsd | 9 + .../xsd/oio/ForsendelseAfsender.xsd | 10 + .../SF1600_EP_SP1-2/xsd/oio/ForsendelseI.xsd | 32 + .../xsd/oio/ForsendelseModtager.xsd | 12 + .../xsd/oio/ForsendelseStatus.xsd | 17 + .../xsd/oio/ForsendelseTypeIdentifikator.xsd | 7 + .../xsd/oio/HasteBrevIndikator.xsd | 6 + .../xsd/oio/ITST_PersonName.xsd | 10 + .../xsd/oio/IndholdStoerrelseMaal.xsd | 5 + ...InformationVedAdresseAendringIndikator.xsd | 6 + .../SF1600_EP_SP1-2/xsd/oio/KanalKode.xsd | 10 + .../xsd/oio/KanalUafhaengigeParametreI.xsd | 28 + .../xsd/oio/KontaktOplysning.xsd | 50 + .../xsd/oio/KonteringsGruppeTekst.xsd | 9 + .../xsd/oio/KuvertTypeKode.xsd | 11 + .../SF1600_EP_SP1-2/xsd/oio/Kvittering.xsd | 53 + .../xsd/oio/KvitteringsEmail.xsd | 8 + .../xsd/oio/KvitteringsTypeKode.xsd | 11 + .../xsd/oio/MIMEcontentIdentifikator.xsd | 5 + .../xsd/oio/MasseForsendelseIdentifikator.xsd | 13 + .../xsd/oio/MeddelelseAfsenderNavn.xsd | 9 + .../xsd/oio/MeddelelseFESDmetadata.xsd | 16 + .../xsd/oio/MeddelelseIdentifikator.xsd | 10 + .../xsd/oio/MeddelelseIndholdData.xsd | 5 + .../xsd/oio/MeddelelseIndholdURLreference.xsd | 5 + .../MeddelelseIndholdstypeIdentifikator.xsd | 5 + .../xsd/oio/MeddelelseServicebeskedTekst.xsd | 9 + .../oio/MeddelelseSvarEmneIdentifikator.xsd | 5 + .../MeddelelseSvarPostkasseIdentifikator.xsd | 5 + .../xsd/oio/MeddelelseSvarTypeNavn.xsd | 11 + .../xsd/oio/MeddelelseTidsfristDato.xsd | 5 + .../xsd/oio/MeddelelseTidsfristTekst.xsd | 9 + .../xsd/oio/MeddelelseTitelTekst.xsd | 9 + .../xsd/oio/MeddelelseTraadIdentifikator.xsd | 5 + .../xsd/oio/MeddelelseTypeNavn.xsd | 10 + .../xsd/oio/MeddelelsesFormatObjekt.xsd | 9 + .../MedsendDokumentRegistreringIndikator.xsd | 4 + .../xsd/oio/ModtagerAdresse.xsd | 5 + .../oio/PaatrykAfsenderAdresseIndikator.xsd | 6 + .../xsd/oio/PaatrykBrevdatoIndikator.xsd | 4 + .../oio/PaatrykModtagerAdresseIndikator.xsd | 4 + .../xsd/oio/PostKategoriKode.xsd | 14 + .../SF1600_EP_SP1-2/xsd/oio/PostParametre.xsd | 20 + .../xsd/oio/PrintParametre.xsd | 16 + ...posthaandteringHosLeverandoerIndikator.xsd | 4 + .../SF1600_EP_SP1-2/xsd/oio/SideKvantitet.xsd | 9 + .../xsd/oio/SimplexDuplexKode.xsd | 10 + .../xsd/oio/SlutbrugerIdentitet.xsd | 12 + .../SF1600_EP_SP1-2/xsd/oio/StandardRetur.xsd | 15 + .../SF1600_EP_SP1-2/xsd/oio/StatusKode.xsd | 8 + .../xsd/oio/TilbagekaldFejlKode.xsd | 11 + .../xsd/oio/TilbagekaldFejlTekst.xsd | 10 + .../xsd/oio/TilbagekaldStatus.xsd | 20 + .../xsd/oio/TilbagekaldStatusKode.xsd | 14 + .../SF1600_EP_SP1-2/xsd/oio/TitelTekst.xsd | 6 + .../xsd/oio/TransaktionsDatoTid.xsd | 6 + .../xsd/oio/TransaktionsParametreI.xsd | 19 + .../SF1600_EP_SP1-2/xsd/oio/UUID.xsd | 9 + .../xsd/oio/UUIDIdentifikator.xsd | 6 + .../oio/VedhaeftSomIndholdDataIndikator.xsd | 6 + .../SF1600_EP_SP1-2/xsd/oio/Vedhaeftning.xsd | 40 + .../xsd/oio/VedhaeftningIndholdData.xsd | 5 + .../oio/VedhaeftningIndholdIdentifikator.xsd | 9 + .../oio/VedhaeftningIndholdURLreference.xsd | 5 + .../xsd/oio/VedhaeftningNavn.xsd | 9 + ...rindeligAfsenderCVRnummerIdentifikator.xsd | 7 + .../VedhaeftningOprindeligAfsenderNavn.xsd | 5 + .../VedhaeftningOprindeligModtagetDatoTid.xsd | 5 + .../xsd/oio/VedhaeftningSamling.xsd | 10 + .../xsd/oio/VedhaeftningSamlingKvantitet.xsd | 5 + .../xsd/oio/XKOM_EmailAddressIdentifier.xsd | 9 + .../PrintService/sp/AuthorityContext_1.xsd | 22 + .../PrintService/sp/CallContext_1.xsd | 38 + .../PrintService/sp/InvocationContext_1.xsd | 67 + .../sp/ServiceplatformFaultMessage_1.wsdl | 18 + .../sp/ServiceplatformFault_1.xsd | 27 + .../PrintService/sp/service.properties | 2 + .../wsdl/context/PrintService.wsdl | 103 ++ .../PrintService/wsdl/context/policies.wsdl | 40 + .../PrintService/wsdl/token/PrintService.wsdl | 103 ++ .../PrintService/wsdl/token/policies.wsdl | 83 + .../xsd/PrintServiceRequestTypes.xsd | 60 + src/Client/ClassMap.php | 51 + src/Client/EnumType/FarveSHKodeType.php | 38 + src/Client/EnumType/KanalKodeType.php | 38 + src/Client/EnumType/KanalvalgType.php | 59 + src/Client/EnumType/KuvertTypeKodeType.php | 45 + .../EnumType/KvitteringsTypeKodeType.php | 45 + .../EnumType/MeddelelseSvarTypeNavnType.php | 45 + src/Client/EnumType/PostKategoriKodeType.php | 66 + src/Client/EnumType/PrioritetType.php | 38 + src/Client/EnumType/SimplexDuplexKodeType.php | 38 + src/Client/ServiceType/Afsend.php | 47 + src/Client/ServiceType/Spoerg.php | 47 + .../StructType/AuthorityContextType.php | 63 + src/Client/StructType/BilagSamlingType.php | 105 ++ src/Client/StructType/BilagType.php | 452 +++++ src/Client/StructType/BrevSPBodyType.php | 127 ++ src/Client/StructType/CallContextType.php | 146 ++ .../CountryIdentificationCodeType.php | 85 + .../StructType/DigitalPostParametreType.php | 259 +++ .../StructType/DokumentParametreType.php | 155 ++ src/Client/StructType/ErrorListType.php | 97 ++ src/Client/StructType/ErrorType.php | 91 + src/Client/StructType/FejlType.php | 146 ++ .../StructType/ForsendelseAfsenderType.php | 54 + src/Client/StructType/ForsendelseIType.php | 413 +++++ .../StructType/ForsendelseModtagerType.php | 85 + .../StructType/InvocationContextType.php | 310 ++++ .../KanalUafhaengigeParametreIType.php | 350 ++++ .../StructType/KontaktOplysningType.php | 1475 +++++++++++++++++ .../StructType/MeddelelseFESDmetadataType.php | 183 ++ .../MeddelelsesFormatObjektType.php | 64 + src/Client/StructType/PostParametreType.php | 202 +++ .../StructType/PrintAfsendBrevRequestType.php | 146 ++ .../PrintAfsendBrevResponseType.php | 57 + src/Client/StructType/PrintParametreType.php | 134 ++ .../PrintSpoergTilmeldingRequestType.php | 146 ++ .../PrintSpoergTilmeldingResponseType.php | 57 + .../StructType/ServiceplatformFaultType.php | 53 + .../StructType/SlutbrugerIdentitetType.php | 187 +++ .../StructType/TilmeldingRequestType.php | 88 + .../StructType/TransaktionsParametreIType.php | 183 ++ src/Consumer/PrintServiceConsumer.php | 294 ++++ src/Manager/TemplateManager.php | 8 +- .../DigitalPostWebformHandler.php | 81 +- 226 files changed, 15566 insertions(+), 17 deletions(-) create mode 100644 README.md create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/ClassMap.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/FarveSHKodeType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/KanalKodeType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/KanalvalgType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/KuvertTypeKodeType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/KvitteringsTypeKodeType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/MeddelelseSvarTypeNavnType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/PostKategoriKodeType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/PrioritetType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/SimplexDuplexKodeType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/ServiceType/Afsend.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/ServiceType/Spoerg.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/AuthorityContextType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BilagSamlingType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BilagType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BrevSPBodyType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/CallContextType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/CountryIdentificationCodeType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/DigitalPostParametreType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/DokumentParametreType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ErrorListType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ErrorType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/FejlType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseAfsenderType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseIType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseModtagerType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/InvocationContextType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/KanalUafhaengigeParametreIType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/KontaktOplysningType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/MeddelelseFESDmetadataType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/MeddelelsesFormatObjektType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PostParametreType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintAfsendBrevRequestType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintAfsendBrevResponseType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintParametreType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintSpoergTilmeldingRequestType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintSpoergTilmeldingResponseType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ServiceplatformFaultType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/SlutbrugerIdentitetType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/TilmeldingRequestType.php create mode 100644 generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/TransaktionsParametreIType.php create mode 100644 generated-sources/PrintService/tutorial.php create mode 100644 phpcs.xml.dist create mode 100644 resources/contracts/PrintService/PrintServiceMsg.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Aa.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Afsendelse.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseDatoTid.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseModtager.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseTilstandNavn.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseURLreference.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsenderAdresse.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsenderSystemIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AllokeringsIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Bilag.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagNavn.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagSamling.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagSorteringsIndeksIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BrevDato.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BrugerNavn.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPR_CompletePostalLabelText.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPR_PersonCivilRegistrationIdentifier.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPRnummerIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CVR_CVRnumberIdentifier.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CVRnummerIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CallContext.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CoNavn.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_CountryIdentificationCode.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_DistrictName.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_DistrictSubdivisionIdentifier.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_FloorIdentifier.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_MailDeliverySublocationIdentifier.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostCodeIdentifier.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostOfficeBoxIdentifier.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFifthLineText.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFirstLineText.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFourthLineText.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressSecondLineText.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressSixthLineText.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressThirdLineText.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_StreetBuildingIdentifier.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_StreetName.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_SuiteIdentifier.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DigitalPostParametre.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DokumentParametre.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/EnhedTekst.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDaktoerIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDdokumentIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDsagIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDsagsklassifikationIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FarveSHKode.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Fejl.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlKode.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlTekst.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlbeskedTekst.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FilformatNavn.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseAfsender.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseI.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseModtager.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseStatus.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseTypeIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/HasteBrevIndikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ITST_PersonName.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/IndholdStoerrelseMaal.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/InformationVedAdresseAendringIndikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KanalKode.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KanalUafhaengigeParametreI.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KontaktOplysning.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KonteringsGruppeTekst.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KuvertTypeKode.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Kvittering.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KvitteringsEmail.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KvitteringsTypeKode.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MIMEcontentIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MasseForsendelseIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseAfsenderNavn.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseFESDmetadata.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdData.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdURLreference.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdstypeIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseServicebeskedTekst.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarEmneIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarPostkasseIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarTypeNavn.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTidsfristDato.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTidsfristTekst.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTitelTekst.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTraadIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTypeNavn.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelsesFormatObjekt.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MedsendDokumentRegistreringIndikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ModtagerAdresse.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykAfsenderAdresseIndikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykBrevdatoIndikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykModtagerAdresseIndikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PostKategoriKode.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PostParametre.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PrintParametre.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ReturposthaandteringHosLeverandoerIndikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SideKvantitet.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SimplexDuplexKode.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SlutbrugerIdentitet.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/StandardRetur.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/StatusKode.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldFejlKode.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldFejlTekst.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldStatus.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldStatusKode.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TitelTekst.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TransaktionsDatoTid.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TransaktionsParametreI.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/UUID.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/UUIDIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftSomIndholdDataIndikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Vedhaeftning.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdData.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdURLreference.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningNavn.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligAfsenderCVRnummerIdentifikator.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligAfsenderNavn.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligModtagetDatoTid.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningSamling.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningSamlingKvantitet.xsd create mode 100644 resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/XKOM_EmailAddressIdentifier.xsd create mode 100644 resources/contracts/PrintService/sp/AuthorityContext_1.xsd create mode 100644 resources/contracts/PrintService/sp/CallContext_1.xsd create mode 100644 resources/contracts/PrintService/sp/InvocationContext_1.xsd create mode 100644 resources/contracts/PrintService/sp/ServiceplatformFaultMessage_1.wsdl create mode 100644 resources/contracts/PrintService/sp/ServiceplatformFault_1.xsd create mode 100644 resources/contracts/PrintService/sp/service.properties create mode 100644 resources/contracts/PrintService/wsdl/context/PrintService.wsdl create mode 100644 resources/contracts/PrintService/wsdl/context/policies.wsdl create mode 100644 resources/contracts/PrintService/wsdl/token/PrintService.wsdl create mode 100644 resources/contracts/PrintService/wsdl/token/policies.wsdl create mode 100644 resources/contracts/PrintService/xsd/PrintServiceRequestTypes.xsd create mode 100644 src/Client/ClassMap.php create mode 100644 src/Client/EnumType/FarveSHKodeType.php create mode 100644 src/Client/EnumType/KanalKodeType.php create mode 100644 src/Client/EnumType/KanalvalgType.php create mode 100644 src/Client/EnumType/KuvertTypeKodeType.php create mode 100644 src/Client/EnumType/KvitteringsTypeKodeType.php create mode 100644 src/Client/EnumType/MeddelelseSvarTypeNavnType.php create mode 100644 src/Client/EnumType/PostKategoriKodeType.php create mode 100644 src/Client/EnumType/PrioritetType.php create mode 100644 src/Client/EnumType/SimplexDuplexKodeType.php create mode 100644 src/Client/ServiceType/Afsend.php create mode 100644 src/Client/ServiceType/Spoerg.php create mode 100644 src/Client/StructType/AuthorityContextType.php create mode 100644 src/Client/StructType/BilagSamlingType.php create mode 100644 src/Client/StructType/BilagType.php create mode 100644 src/Client/StructType/BrevSPBodyType.php create mode 100644 src/Client/StructType/CallContextType.php create mode 100644 src/Client/StructType/CountryIdentificationCodeType.php create mode 100644 src/Client/StructType/DigitalPostParametreType.php create mode 100644 src/Client/StructType/DokumentParametreType.php create mode 100644 src/Client/StructType/ErrorListType.php create mode 100644 src/Client/StructType/ErrorType.php create mode 100644 src/Client/StructType/FejlType.php create mode 100644 src/Client/StructType/ForsendelseAfsenderType.php create mode 100644 src/Client/StructType/ForsendelseIType.php create mode 100644 src/Client/StructType/ForsendelseModtagerType.php create mode 100644 src/Client/StructType/InvocationContextType.php create mode 100644 src/Client/StructType/KanalUafhaengigeParametreIType.php create mode 100644 src/Client/StructType/KontaktOplysningType.php create mode 100644 src/Client/StructType/MeddelelseFESDmetadataType.php create mode 100644 src/Client/StructType/MeddelelsesFormatObjektType.php create mode 100644 src/Client/StructType/PostParametreType.php create mode 100644 src/Client/StructType/PrintAfsendBrevRequestType.php create mode 100644 src/Client/StructType/PrintAfsendBrevResponseType.php create mode 100644 src/Client/StructType/PrintParametreType.php create mode 100644 src/Client/StructType/PrintSpoergTilmeldingRequestType.php create mode 100644 src/Client/StructType/PrintSpoergTilmeldingResponseType.php create mode 100644 src/Client/StructType/ServiceplatformFaultType.php create mode 100644 src/Client/StructType/SlutbrugerIdentitetType.php create mode 100644 src/Client/StructType/TilmeldingRequestType.php create mode 100644 src/Client/StructType/TransaktionsParametreIType.php create mode 100644 src/Consumer/PrintServiceConsumer.php diff --git a/README.md b/README.md new file mode 100644 index 0000000..89056fa --- /dev/null +++ b/README.md @@ -0,0 +1,92 @@ +# OS2Forms Digital Post + +Send Digital Post to danish citizens from a webform. + +## Installation + +Require it with composer: + +```shell +composer require "itk-dev/os2forms-digital-post" +``` + +Enable it with drush: + +```shell +drush pm:enable os2forms_digital_post +``` + +Add the following configuration: + +```php +$config['os2forms_digital_post'] = [ + 'path_to_templates' => '', + + 'digital_post_system_id' => '', + 'digital_post_afsender_system' => '', + + 'digital_post_materiale_id' => '', + + 'digital_post_forsendelses_type' => '', + + 'azure_tenant_id' => '', + 'azure_application_id' => '', + 'azure_client_secret' => '', + + 'azure_key_vault_name' => '', + 'azure_key_vault_secret' => '', + 'azure_key_vault_secret_version' => '', + + 'service_agreement_uuid' => '', + 'user_system_uuid' => '', + 'user_uuid' => '', + + 'service_uuid' => 'fd885b8b-4a3f-46cb-b367-6c9dda1c78f6', + 'service_endpoint' => 'https://prod.serviceplatformen.dk/service/Print/Print/2', + 'service_contract' => dirname(DRUPAL_ROOT) . '/web/modules/contrib/os2forms-digital-post/resources/contracts/PrintService/wsdl/context/PrintService.wsdl', +]; + +``` + +## Templating / Styling the PDF +You'll need to provide a PDF template, that will be rendered when sending letters via digital post. +The template has to be in the twig format and accessible by this module. Configure the path to your templates +in the settings mentioned above. + +The following variables is present in the twig-template: +* logo - Path to the logo in your template. +* recipient - Which holds information about the recipient of the letter. +* elements - The elements submitted in the form. + +### Structure of template +Your template folder structure has to be as following: +```shell +/templates-root # Set this folder as "path_to_templates" in the settings. + /name-of-template + index.html.twig # The actual twig template. + logo.png # Logo + styles.css # The styles. Be aware that this module uses DomPDF to render the PDF, and therefore are submitted to the CSS rules defined in DomPDF. +``` + +## Usage + +This module provides functionality for sending digital post to danish citizens. +A WebformHandler is provided that you can add to your webform, and if configured +it will send the submitted data as digital post. + +This module provides functionality for querying the danish CPR register and +showing the result in webforms. + +## Coding standards + +Check coding standards (run `composer install` to install the required tools): + +```shell +composer coding-standards-check +``` + +Apply coding standards: + +```shell +composer coding-standards-apply +``` diff --git a/composer.json b/composer.json index 18cd0a8..e0db2c0 100644 --- a/composer.json +++ b/composer.json @@ -9,21 +9,45 @@ "email": "lats@aarhus.dk" } ], + "repositories": [ + { + "type": "composer", + "url": "https://packages.drupal.org/8" + } + ], "minimum-stability": "dev", "prefer-stable": true, "require": { "ext-soap": "*", - "itk-dev/serviceplatformen": "^1.0", + "itk-dev/serviceplatformen": "^1.1", "php-http/guzzle6-adapter": "^2.0.1", "http-interop/http-factory-guzzle": "^1.0.0", "symfony/property-access": "^4.4", "wsdltophp/packagebase": "^5.0", - "dompdf/dompdf": "~0.8.0" + "dompdf/dompdf": "~0.8.0", + "os2forms/os2forms": "^2.5", + "itk-dev/os2forms-cpr-lookup": "^1.2" }, "autoload": { "Drupal\\os2forms_digital_post\\": "src/" }, "require-dev": { - "wsdltophp/packagegenerator": "^4.0" + "wsdltophp/packagegenerator": "^4.0", + "drupal/coder": "^8.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1" + }, + "scripts": { + "coding-standards-check/phpcs": [ + "phpcs --standard=phpcs.xml.dist" + ], + "coding-standards-check": [ + "@coding-standards-check/phpcs" + ], + "coding-standards-apply/phpcs": [ + "phpcbf --standard=phpcs.xml.dist" + ], + "coding-standards-apply": [ + "@coding-standards-apply/phpcs" + ] } } diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/ClassMap.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/ClassMap.php new file mode 100644 index 0000000..f2be373 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/ClassMap.php @@ -0,0 +1,51 @@ + '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\InvocationContextType', + 'AuthorityContextType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\AuthorityContextType', + 'CallContextType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\CallContextType', + 'MeddelelsesFormatObjektType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\MeddelelsesFormatObjektType', + 'DokumentParametreType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\DokumentParametreType', + 'CountryIdentificationCodeType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\CountryIdentificationCodeType', + 'KontaktOplysningType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\KontaktOplysningType', + 'ForsendelseAfsenderType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\ForsendelseAfsenderType', + 'KanalUafhaengigeParametreIType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\KanalUafhaengigeParametreIType', + 'MeddelelseFESDmetadataType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\MeddelelseFESDmetadataType', + 'DigitalPostParametreType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\DigitalPostParametreType', + 'PostParametreType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\PostParametreType', + 'TransaktionsParametreIType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\TransaktionsParametreIType', + 'PrintParametreType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\PrintParametreType', + 'SlutbrugerIdentitetType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\SlutbrugerIdentitetType', + 'ForsendelseModtagerType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\ForsendelseModtagerType', + 'BilagType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\BilagType', + 'BilagSamlingType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\BilagSamlingType', + 'ForsendelseIType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\ForsendelseIType', + 'BrevSPBodyType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\BrevSPBodyType', + 'TilmeldingRequestType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\TilmeldingRequestType', + 'PrintAfsendBrevRequestType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\PrintAfsendBrevRequestType', + 'PrintAfsendBrevResponseType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\PrintAfsendBrevResponseType', + 'PrintSpoergTilmeldingRequestType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\PrintSpoergTilmeldingRequestType', + 'PrintSpoergTilmeldingResponseType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\PrintSpoergTilmeldingResponseType', + 'FejlType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\FejlType', + 'ServiceplatformFaultType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\ServiceplatformFaultType', + 'ErrorListType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\ErrorListType', + 'ErrorType' => '\\ItkDev\\OS2Forms_Digital_Post\\PrintService\\StructType\\ErrorType', + ]; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/FarveSHKodeType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/FarveSHKodeType.php new file mode 100644 index 0000000..d02e7a5 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/EnumType/FarveSHKodeType.php @@ -0,0 +1,38 @@ +setResult($resultAfsendBrev = $this->getSoapClient()->__soapCall('afsendBrev', [ + $request, + ], [], [], $this->outputHeaders)); + + return $resultAfsendBrev; + } catch (SoapFault $soapFault) { + $this->saveLastError(__METHOD__, $soapFault); + + return false; + } + } + /** + * Returns the result + * @see AbstractSoapClientBase::getResult() + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintAfsendBrevResponseType + */ + public function getResult() + { + return parent::getResult(); + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/ServiceType/Spoerg.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/ServiceType/Spoerg.php new file mode 100644 index 0000000..108761a --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/ServiceType/Spoerg.php @@ -0,0 +1,47 @@ +setResult($resultSpoergTilmelding = $this->getSoapClient()->__soapCall('spoergTilmelding', [ + $request, + ], [], [], $this->outputHeaders)); + + return $resultSpoergTilmelding; + } catch (SoapFault $soapFault) { + $this->saveLastError(__METHOD__, $soapFault); + + return false; + } + } + /** + * Returns the result + * @see AbstractSoapClientBase::getResult() + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintSpoergTilmeldingResponseType + */ + public function getResult() + { + return parent::getResult(); + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/AuthorityContextType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/AuthorityContextType.php new file mode 100644 index 0000000..5c722a7 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/AuthorityContextType.php @@ -0,0 +1,63 @@ +setMunicipalityCVR($municipalityCVR); + } + /** + * Get MunicipalityCVR value + * @return string + */ + public function getMunicipalityCVR(): string + { + return $this->MunicipalityCVR; + } + /** + * Set MunicipalityCVR value + * @param string $municipalityCVR + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\AuthorityContextType + */ + public function setMunicipalityCVR(string $municipalityCVR): self + { + // validation for constraint: string + if (!is_null($municipalityCVR) && !is_string($municipalityCVR)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($municipalityCVR, true), gettype($municipalityCVR)), __LINE__); + } + // validation for constraint: pattern([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) + if (!is_null($municipalityCVR) && !preg_match('/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/', $municipalityCVR)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/', var_export($municipalityCVR, true)), __LINE__); + } + $this->MunicipalityCVR = $municipalityCVR; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BilagSamlingType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BilagSamlingType.php new file mode 100644 index 0000000..bfda73d --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BilagSamlingType.php @@ -0,0 +1,105 @@ +setBilag($bilag); + } + /** + * Get Bilag value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType[] + */ + public function getBilag(): array + { + return $this->Bilag; + } + /** + * This method is responsible for validating the values passed to the setBilag method + * This method is willingly generated in order to preserve the one-line inline validation within the setBilag method + * @param array $values + * @return string A non-empty message if the values does not match the validation rules + */ + public static function validateBilagForArrayConstraintsFromSetBilag(array $values = []): string + { + $message = ''; + $invalidValues = []; + foreach ($values as $bilagSamlingTypeBilagItem) { + // validation for constraint: itemType + if (!$bilagSamlingTypeBilagItem instanceof \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType) { + $invalidValues[] = is_object($bilagSamlingTypeBilagItem) ? get_class($bilagSamlingTypeBilagItem) : sprintf('%s(%s)', gettype($bilagSamlingTypeBilagItem), var_export($bilagSamlingTypeBilagItem, true)); + } + } + if (!empty($invalidValues)) { + $message = sprintf('The Bilag property can only contain items of type \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); + } + unset($invalidValues); + + return $message; + } + /** + * Set Bilag value + * @throws InvalidArgumentException + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType[] $bilag + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagSamlingType + */ + public function setBilag(array $bilag = []): self + { + // validation for constraint: array + if ('' !== ($bilagArrayErrorMessage = self::validateBilagForArrayConstraintsFromSetBilag($bilag))) { + throw new InvalidArgumentException($bilagArrayErrorMessage, __LINE__); + } + // validation for constraint: maxOccurs(100) + if (is_array($bilag) && count($bilag) > 100) { + throw new InvalidArgumentException(sprintf('Invalid count of %s, the number of elements contained by the property must be less than or equal to 100', count($bilag)), __LINE__); + } + $this->Bilag = $bilag; + + return $this; + } + /** + * Add item to Bilag value + * @throws InvalidArgumentException + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType $item + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagSamlingType + */ + public function addToBilag(\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType $item): self + { + // validation for constraint: itemType + if (!$item instanceof \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType) { + throw new InvalidArgumentException(sprintf('The Bilag property can only contain items of type \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); + } + // validation for constraint: maxOccurs(100) + if (is_array($this->Bilag) && count($this->Bilag) >= 100) { + throw new InvalidArgumentException(sprintf('You can\'t add anymore element to this property that already contains %s elements, the number of elements contained by the property must be less than or equal to 100', count($this->Bilag)), __LINE__); + } + $this->Bilag[] = $item; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BilagType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BilagType.php new file mode 100644 index 0000000..1ac4b03 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BilagType.php @@ -0,0 +1,452 @@ +setBilagNavn($bilagNavn) + ->setFilformatNavn($filformatNavn) + ->setBilagSorteringsIndeksIdentifikator($bilagSorteringsIndeksIdentifikator) + ->setBilagIdentifikator($bilagIdentifikator) + ->setVedhaeftningIndholdData($vedhaeftningIndholdData) + ->setVedhaeftningIndholdURLreference($vedhaeftningIndholdURLreference) + ->setVedhaeftSomIndholdDataIndikator($vedhaeftSomIndholdDataIndikator); + } + /** + * Get BilagNavn value + * @return string|null + */ + public function getBilagNavn(): ?string + { + return $this->BilagNavn; + } + /** + * Set BilagNavn value + * @param string $bilagNavn + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType + */ + public function setBilagNavn(?string $bilagNavn = null): self + { + // validation for constraint: string + if (!is_null($bilagNavn) && !is_string($bilagNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($bilagNavn, true), gettype($bilagNavn)), __LINE__); + } + // validation for constraint: maxLength(300) + if (!is_null($bilagNavn) && mb_strlen((string) $bilagNavn) > 300) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 300', mb_strlen((string) $bilagNavn)), __LINE__); + } + $this->BilagNavn = $bilagNavn; + + return $this; + } + /** + * Get FilformatNavn value + * @return string|null + */ + public function getFilformatNavn(): ?string + { + return $this->FilformatNavn; + } + /** + * Set FilformatNavn value + * @param string $filformatNavn + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType + */ + public function setFilformatNavn(?string $filformatNavn = null): self + { + // validation for constraint: string + if (!is_null($filformatNavn) && !is_string($filformatNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($filformatNavn, true), gettype($filformatNavn)), __LINE__); + } + // validation for constraint: maxLength(10) + if (!is_null($filformatNavn) && mb_strlen((string) $filformatNavn) > 10) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 10', mb_strlen((string) $filformatNavn)), __LINE__); + } + $this->FilformatNavn = $filformatNavn; + + return $this; + } + /** + * Get BilagSorteringsIndeksIdentifikator value + * @return int|null + */ + public function getBilagSorteringsIndeksIdentifikator(): ?int + { + return $this->BilagSorteringsIndeksIdentifikator; + } + /** + * Set BilagSorteringsIndeksIdentifikator value + * @param int $bilagSorteringsIndeksIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType + */ + public function setBilagSorteringsIndeksIdentifikator(?int $bilagSorteringsIndeksIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($bilagSorteringsIndeksIdentifikator) && !(is_int($bilagSorteringsIndeksIdentifikator) || ctype_digit($bilagSorteringsIndeksIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($bilagSorteringsIndeksIdentifikator, true), gettype($bilagSorteringsIndeksIdentifikator)), __LINE__); + } + $this->BilagSorteringsIndeksIdentifikator = $bilagSorteringsIndeksIdentifikator; + + return $this; + } + /** + * Get BilagIdentifikator value + * @return string|null + */ + public function getBilagIdentifikator(): ?string + { + return isset($this->BilagIdentifikator) ? $this->BilagIdentifikator : null; + } + /** + * This method is responsible for validating the value passed to the setBilagIdentifikator method + * This method is willingly generated in order to preserve the one-line inline validation within the setBilagIdentifikator method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateBilagIdentifikatorForChoiceConstraintsFromSetBilagIdentifikator($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'VedhaeftningIndholdData', + 'VedhaeftningIndholdURLreference', + 'VedhaeftSomIndholdDataIndikator', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property BilagIdentifikator can\'t be set as the property %s is already set. Only one property must be set among these properties: BilagIdentifikator, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set BilagIdentifikator value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $bilagIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType + */ + public function setBilagIdentifikator(?string $bilagIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($bilagIdentifikator) && !is_string($bilagIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($bilagIdentifikator, true), gettype($bilagIdentifikator)), __LINE__); + } + // validation for constraint: choice(BilagIdentifikator, VedhaeftningIndholdData, VedhaeftningIndholdURLreference, VedhaeftSomIndholdDataIndikator) + if ('' !== ($bilagIdentifikatorChoiceErrorMessage = self::validateBilagIdentifikatorForChoiceConstraintsFromSetBilagIdentifikator($bilagIdentifikator))) { + throw new InvalidArgumentException($bilagIdentifikatorChoiceErrorMessage, __LINE__); + } + // validation for constraint: maxLength(10) + if (!is_null($bilagIdentifikator) && mb_strlen((string) $bilagIdentifikator) > 10) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 10', mb_strlen((string) $bilagIdentifikator)), __LINE__); + } + if (is_null($bilagIdentifikator) || (is_array($bilagIdentifikator) && empty($bilagIdentifikator))) { + unset($this->BilagIdentifikator); + } else { + $this->BilagIdentifikator = $bilagIdentifikator; + } + + return $this; + } + /** + * Get VedhaeftningIndholdData value + * @return string|null + */ + public function getVedhaeftningIndholdData(): ?string + { + return isset($this->VedhaeftningIndholdData) ? $this->VedhaeftningIndholdData : null; + } + /** + * This method is responsible for validating the value passed to the setVedhaeftningIndholdData method + * This method is willingly generated in order to preserve the one-line inline validation within the setVedhaeftningIndholdData method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateVedhaeftningIndholdDataForChoiceConstraintsFromSetVedhaeftningIndholdData($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'BilagIdentifikator', + 'VedhaeftningIndholdURLreference', + 'VedhaeftSomIndholdDataIndikator', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property VedhaeftningIndholdData can\'t be set as the property %s is already set. Only one property must be set among these properties: VedhaeftningIndholdData, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set VedhaeftningIndholdData value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $vedhaeftningIndholdData + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType + */ + public function setVedhaeftningIndholdData(?string $vedhaeftningIndholdData = null): self + { + // validation for constraint: string + if (!is_null($vedhaeftningIndholdData) && !is_string($vedhaeftningIndholdData)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($vedhaeftningIndholdData, true), gettype($vedhaeftningIndholdData)), __LINE__); + } + // validation for constraint: choice(BilagIdentifikator, VedhaeftningIndholdData, VedhaeftningIndholdURLreference, VedhaeftSomIndholdDataIndikator) + if ('' !== ($vedhaeftningIndholdDataChoiceErrorMessage = self::validateVedhaeftningIndholdDataForChoiceConstraintsFromSetVedhaeftningIndholdData($vedhaeftningIndholdData))) { + throw new InvalidArgumentException($vedhaeftningIndholdDataChoiceErrorMessage, __LINE__); + } + if (is_null($vedhaeftningIndholdData) || (is_array($vedhaeftningIndholdData) && empty($vedhaeftningIndholdData))) { + unset($this->VedhaeftningIndholdData); + } else { + $this->VedhaeftningIndholdData = $vedhaeftningIndholdData; + } + + return $this; + } + /** + * Get VedhaeftningIndholdURLreference value + * @return string|null + */ + public function getVedhaeftningIndholdURLreference(): ?string + { + return isset($this->VedhaeftningIndholdURLreference) ? $this->VedhaeftningIndholdURLreference : null; + } + /** + * This method is responsible for validating the value passed to the setVedhaeftningIndholdURLreference method + * This method is willingly generated in order to preserve the one-line inline validation within the setVedhaeftningIndholdURLreference method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateVedhaeftningIndholdURLreferenceForChoiceConstraintsFromSetVedhaeftningIndholdURLreference($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'BilagIdentifikator', + 'VedhaeftningIndholdData', + 'VedhaeftSomIndholdDataIndikator', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property VedhaeftningIndholdURLreference can\'t be set as the property %s is already set. Only one property must be set among these properties: VedhaeftningIndholdURLreference, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set VedhaeftningIndholdURLreference value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $vedhaeftningIndholdURLreference + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType + */ + public function setVedhaeftningIndholdURLreference(?string $vedhaeftningIndholdURLreference = null): self + { + // validation for constraint: string + if (!is_null($vedhaeftningIndholdURLreference) && !is_string($vedhaeftningIndholdURLreference)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($vedhaeftningIndholdURLreference, true), gettype($vedhaeftningIndholdURLreference)), __LINE__); + } + // validation for constraint: choice(BilagIdentifikator, VedhaeftningIndholdData, VedhaeftningIndholdURLreference, VedhaeftSomIndholdDataIndikator) + if ('' !== ($vedhaeftningIndholdURLreferenceChoiceErrorMessage = self::validateVedhaeftningIndholdURLreferenceForChoiceConstraintsFromSetVedhaeftningIndholdURLreference($vedhaeftningIndholdURLreference))) { + throw new InvalidArgumentException($vedhaeftningIndholdURLreferenceChoiceErrorMessage, __LINE__); + } + if (is_null($vedhaeftningIndholdURLreference) || (is_array($vedhaeftningIndholdURLreference) && empty($vedhaeftningIndholdURLreference))) { + unset($this->VedhaeftningIndholdURLreference); + } else { + $this->VedhaeftningIndholdURLreference = $vedhaeftningIndholdURLreference; + } + + return $this; + } + /** + * Get VedhaeftSomIndholdDataIndikator value + * @return bool|null + */ + public function getVedhaeftSomIndholdDataIndikator(): ?bool + { + return isset($this->VedhaeftSomIndholdDataIndikator) ? $this->VedhaeftSomIndholdDataIndikator : null; + } + /** + * This method is responsible for validating the value passed to the setVedhaeftSomIndholdDataIndikator method + * This method is willingly generated in order to preserve the one-line inline validation within the setVedhaeftSomIndholdDataIndikator method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateVedhaeftSomIndholdDataIndikatorForChoiceConstraintsFromSetVedhaeftSomIndholdDataIndikator($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'BilagIdentifikator', + 'VedhaeftningIndholdData', + 'VedhaeftningIndholdURLreference', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property VedhaeftSomIndholdDataIndikator can\'t be set as the property %s is already set. Only one property must be set among these properties: VedhaeftSomIndholdDataIndikator, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set VedhaeftSomIndholdDataIndikator value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param bool $vedhaeftSomIndholdDataIndikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagType + */ + public function setVedhaeftSomIndholdDataIndikator(?bool $vedhaeftSomIndholdDataIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($vedhaeftSomIndholdDataIndikator) && !is_bool($vedhaeftSomIndholdDataIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($vedhaeftSomIndholdDataIndikator, true), gettype($vedhaeftSomIndholdDataIndikator)), __LINE__); + } + // validation for constraint: choice(BilagIdentifikator, VedhaeftningIndholdData, VedhaeftningIndholdURLreference, VedhaeftSomIndholdDataIndikator) + if ('' !== ($vedhaeftSomIndholdDataIndikatorChoiceErrorMessage = self::validateVedhaeftSomIndholdDataIndikatorForChoiceConstraintsFromSetVedhaeftSomIndholdDataIndikator($vedhaeftSomIndholdDataIndikator))) { + throw new InvalidArgumentException($vedhaeftSomIndholdDataIndikatorChoiceErrorMessage, __LINE__); + } + if (is_null($vedhaeftSomIndholdDataIndikator) || (is_array($vedhaeftSomIndholdDataIndikator) && empty($vedhaeftSomIndholdDataIndikator))) { + unset($this->VedhaeftSomIndholdDataIndikator); + } else { + $this->VedhaeftSomIndholdDataIndikator = $vedhaeftSomIndholdDataIndikator; + } + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BrevSPBodyType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BrevSPBodyType.php new file mode 100644 index 0000000..3ccc163 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/BrevSPBodyType.php @@ -0,0 +1,127 @@ +setKanalvalg($kanalvalg) + ->setPrioritet($prioritet) + ->setForsendelseI($forsendelseI); + } + /** + * Get Kanalvalg value + * @return string + */ + public function getKanalvalg(): string + { + return $this->Kanalvalg; + } + /** + * Set Kanalvalg value + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KanalvalgType::valueIsValid() + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KanalvalgType::getValidValues() + * @throws InvalidArgumentException + * @param string $kanalvalg + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BrevSPBodyType + */ + public function setKanalvalg(string $kanalvalg): self + { + // validation for constraint: enumeration + if (!\ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KanalvalgType::valueIsValid($kanalvalg)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KanalvalgType', is_array($kanalvalg) ? implode(', ', $kanalvalg) : var_export($kanalvalg, true), implode(', ', \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KanalvalgType::getValidValues())), __LINE__); + } + $this->Kanalvalg = $kanalvalg; + + return $this; + } + /** + * Get Prioritet value + * @return string + */ + public function getPrioritet(): string + { + return $this->Prioritet; + } + /** + * Set Prioritet value + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\PrioritetType::valueIsValid() + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\PrioritetType::getValidValues() + * @throws InvalidArgumentException + * @param string $prioritet + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BrevSPBodyType + */ + public function setPrioritet(string $prioritet): self + { + // validation for constraint: enumeration + if (!\ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\PrioritetType::valueIsValid($prioritet)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\PrioritetType', is_array($prioritet) ? implode(', ', $prioritet) : var_export($prioritet, true), implode(', ', \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\PrioritetType::getValidValues())), __LINE__); + } + $this->Prioritet = $prioritet; + + return $this; + } + /** + * Get ForsendelseI value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function getForsendelseI(): \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + { + return $this->ForsendelseI; + } + /** + * Set ForsendelseI value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType $forsendelseI + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BrevSPBodyType + */ + public function setForsendelseI(\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType $forsendelseI): self + { + $this->ForsendelseI = $forsendelseI; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/CallContextType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/CallContextType.php new file mode 100644 index 0000000..cc4041b --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/CallContextType.php @@ -0,0 +1,146 @@ +setOnBehalfOfUser($onBehalfOfUser) + ->setCallersServiceCallIdentifier($callersServiceCallIdentifier) + ->setAccountingInfo($accountingInfo); + } + /** + * Get OnBehalfOfUser value + * @return string|null + */ + public function getOnBehalfOfUser(): ?string + { + return $this->OnBehalfOfUser; + } + /** + * Set OnBehalfOfUser value + * @param string $onBehalfOfUser + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CallContextType + */ + public function setOnBehalfOfUser(?string $onBehalfOfUser = null): self + { + // validation for constraint: string + if (!is_null($onBehalfOfUser) && !is_string($onBehalfOfUser)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($onBehalfOfUser, true), gettype($onBehalfOfUser)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($onBehalfOfUser) && mb_strlen((string) $onBehalfOfUser) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $onBehalfOfUser)), __LINE__); + } + $this->OnBehalfOfUser = $onBehalfOfUser; + + return $this; + } + /** + * Get CallersServiceCallIdentifier value + * @return string|null + */ + public function getCallersServiceCallIdentifier(): ?string + { + return $this->CallersServiceCallIdentifier; + } + /** + * Set CallersServiceCallIdentifier value + * @param string $callersServiceCallIdentifier + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CallContextType + */ + public function setCallersServiceCallIdentifier(?string $callersServiceCallIdentifier = null): self + { + // validation for constraint: string + if (!is_null($callersServiceCallIdentifier) && !is_string($callersServiceCallIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callersServiceCallIdentifier, true), gettype($callersServiceCallIdentifier)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($callersServiceCallIdentifier) && mb_strlen((string) $callersServiceCallIdentifier) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $callersServiceCallIdentifier)), __LINE__); + } + $this->CallersServiceCallIdentifier = $callersServiceCallIdentifier; + + return $this; + } + /** + * Get AccountingInfo value + * @return string|null + */ + public function getAccountingInfo(): ?string + { + return $this->AccountingInfo; + } + /** + * Set AccountingInfo value + * @param string $accountingInfo + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CallContextType + */ + public function setAccountingInfo(?string $accountingInfo = null): self + { + // validation for constraint: string + if (!is_null($accountingInfo) && !is_string($accountingInfo)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($accountingInfo, true), gettype($accountingInfo)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($accountingInfo) && mb_strlen((string) $accountingInfo) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $accountingInfo)), __LINE__); + } + $this->AccountingInfo = $accountingInfo; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/CountryIdentificationCodeType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/CountryIdentificationCodeType.php new file mode 100644 index 0000000..2a2fcf6 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/CountryIdentificationCodeType.php @@ -0,0 +1,85 @@ +set_($_) + ->setScheme($scheme); + } + /** + * Get _ value + * @return string|null + */ + public function get_(): ?string + { + return $this->_; + } + /** + * Set _ value + * @param string $_ + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CountryIdentificationCodeType + */ + public function set_(?string $_ = null): self + { + // validation for constraint: string + if (!is_null($_) && !is_string($_)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($_, true), gettype($_)), __LINE__); + } + $this->_ = $_; + + return $this; + } + /** + * Get scheme value + * @return string|null + */ + public function getScheme(): ?string + { + return $this->scheme; + } + /** + * Set scheme value + * @param string $scheme + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CountryIdentificationCodeType + */ + public function setScheme(?string $scheme = null): self + { + // validation for constraint: string + if (!is_null($scheme) && !is_string($scheme)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($scheme, true), gettype($scheme)), __LINE__); + } + $this->scheme = $scheme; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/DigitalPostParametreType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/DigitalPostParametreType.php new file mode 100644 index 0000000..6c4ed00 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/DigitalPostParametreType.php @@ -0,0 +1,259 @@ +setAfsendelseDatoTid($afsendelseDatoTid) + ->setMeddelelseIndholdstypeIdentifikator($meddelelseIndholdstypeIdentifikator) + ->setMeddelelseSvarTypeNavn($meddelelseSvarTypeNavn) + ->setMeddelelseSvarPostkasseIdentifikator($meddelelseSvarPostkasseIdentifikator) + ->setMeddelelseSvarEmneIdentifikator($meddelelseSvarEmneIdentifikator) + ->setMeddelelseFESDmetadata($meddelelseFESDmetadata) + ->setMedsendDokumentRegistreringIndikator($medsendDokumentRegistreringIndikator); + } + /** + * Get AfsendelseDatoTid value + * @return string|null + */ + public function getAfsendelseDatoTid(): ?string + { + return $this->AfsendelseDatoTid; + } + /** + * Set AfsendelseDatoTid value + * @param string $afsendelseDatoTid + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DigitalPostParametreType + */ + public function setAfsendelseDatoTid(?string $afsendelseDatoTid = null): self + { + // validation for constraint: string + if (!is_null($afsendelseDatoTid) && !is_string($afsendelseDatoTid)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($afsendelseDatoTid, true), gettype($afsendelseDatoTid)), __LINE__); + } + $this->AfsendelseDatoTid = $afsendelseDatoTid; + + return $this; + } + /** + * Get MeddelelseIndholdstypeIdentifikator value + * @return int|null + */ + public function getMeddelelseIndholdstypeIdentifikator(): ?int + { + return $this->MeddelelseIndholdstypeIdentifikator; + } + /** + * Set MeddelelseIndholdstypeIdentifikator value + * @param int $meddelelseIndholdstypeIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DigitalPostParametreType + */ + public function setMeddelelseIndholdstypeIdentifikator(?int $meddelelseIndholdstypeIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($meddelelseIndholdstypeIdentifikator) && !(is_int($meddelelseIndholdstypeIdentifikator) || ctype_digit($meddelelseIndholdstypeIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($meddelelseIndholdstypeIdentifikator, true), gettype($meddelelseIndholdstypeIdentifikator)), __LINE__); + } + $this->MeddelelseIndholdstypeIdentifikator = $meddelelseIndholdstypeIdentifikator; + + return $this; + } + /** + * Get MeddelelseSvarTypeNavn value + * @return string|null + */ + public function getMeddelelseSvarTypeNavn(): ?string + { + return $this->MeddelelseSvarTypeNavn; + } + /** + * Set MeddelelseSvarTypeNavn value + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\MeddelelseSvarTypeNavnType::valueIsValid() + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\MeddelelseSvarTypeNavnType::getValidValues() + * @throws InvalidArgumentException + * @param string $meddelelseSvarTypeNavn + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DigitalPostParametreType + */ + public function setMeddelelseSvarTypeNavn(?string $meddelelseSvarTypeNavn = null): self + { + // validation for constraint: enumeration + if (!\ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\MeddelelseSvarTypeNavnType::valueIsValid($meddelelseSvarTypeNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\MeddelelseSvarTypeNavnType', is_array($meddelelseSvarTypeNavn) ? implode(', ', $meddelelseSvarTypeNavn) : var_export($meddelelseSvarTypeNavn, true), implode(', ', \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\MeddelelseSvarTypeNavnType::getValidValues())), __LINE__); + } + $this->MeddelelseSvarTypeNavn = $meddelelseSvarTypeNavn; + + return $this; + } + /** + * Get MeddelelseSvarPostkasseIdentifikator value + * @return int|null + */ + public function getMeddelelseSvarPostkasseIdentifikator(): ?int + { + return $this->MeddelelseSvarPostkasseIdentifikator; + } + /** + * Set MeddelelseSvarPostkasseIdentifikator value + * @param int $meddelelseSvarPostkasseIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DigitalPostParametreType + */ + public function setMeddelelseSvarPostkasseIdentifikator(?int $meddelelseSvarPostkasseIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($meddelelseSvarPostkasseIdentifikator) && !(is_int($meddelelseSvarPostkasseIdentifikator) || ctype_digit($meddelelseSvarPostkasseIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($meddelelseSvarPostkasseIdentifikator, true), gettype($meddelelseSvarPostkasseIdentifikator)), __LINE__); + } + $this->MeddelelseSvarPostkasseIdentifikator = $meddelelseSvarPostkasseIdentifikator; + + return $this; + } + /** + * Get MeddelelseSvarEmneIdentifikator value + * @return int|null + */ + public function getMeddelelseSvarEmneIdentifikator(): ?int + { + return $this->MeddelelseSvarEmneIdentifikator; + } + /** + * Set MeddelelseSvarEmneIdentifikator value + * @param int $meddelelseSvarEmneIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DigitalPostParametreType + */ + public function setMeddelelseSvarEmneIdentifikator(?int $meddelelseSvarEmneIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($meddelelseSvarEmneIdentifikator) && !(is_int($meddelelseSvarEmneIdentifikator) || ctype_digit($meddelelseSvarEmneIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($meddelelseSvarEmneIdentifikator, true), gettype($meddelelseSvarEmneIdentifikator)), __LINE__); + } + $this->MeddelelseSvarEmneIdentifikator = $meddelelseSvarEmneIdentifikator; + + return $this; + } + /** + * Get MeddelelseFESDmetadata value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelseFESDmetadataType|null + */ + public function getMeddelelseFESDmetadata(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelseFESDmetadataType + { + return $this->MeddelelseFESDmetadata; + } + /** + * Set MeddelelseFESDmetadata value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelseFESDmetadataType $meddelelseFESDmetadata + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DigitalPostParametreType + */ + public function setMeddelelseFESDmetadata(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelseFESDmetadataType $meddelelseFESDmetadata = null): self + { + $this->MeddelelseFESDmetadata = $meddelelseFESDmetadata; + + return $this; + } + /** + * Get MedsendDokumentRegistreringIndikator value + * @return bool|null + */ + public function getMedsendDokumentRegistreringIndikator(): ?bool + { + return $this->MedsendDokumentRegistreringIndikator; + } + /** + * Set MedsendDokumentRegistreringIndikator value + * @param bool $medsendDokumentRegistreringIndikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DigitalPostParametreType + */ + public function setMedsendDokumentRegistreringIndikator(?bool $medsendDokumentRegistreringIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($medsendDokumentRegistreringIndikator) && !is_bool($medsendDokumentRegistreringIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($medsendDokumentRegistreringIndikator, true), gettype($medsendDokumentRegistreringIndikator)), __LINE__); + } + $this->MedsendDokumentRegistreringIndikator = $medsendDokumentRegistreringIndikator; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/DokumentParametreType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/DokumentParametreType.php new file mode 100644 index 0000000..d6cdc43 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/DokumentParametreType.php @@ -0,0 +1,155 @@ +setTitelTekst($titelTekst) + ->setUUIDIdentifikator($uUIDIdentifikator) + ->setBrevDato($brevDato) + ->setMeddelelsesFormatObjekt($meddelelsesFormatObjekt); + } + /** + * Get TitelTekst value + * @return string|null + */ + public function getTitelTekst(): ?string + { + return $this->TitelTekst; + } + /** + * Set TitelTekst value + * @param string $titelTekst + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DokumentParametreType + */ + public function setTitelTekst(?string $titelTekst = null): self + { + // validation for constraint: string + if (!is_null($titelTekst) && !is_string($titelTekst)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($titelTekst, true), gettype($titelTekst)), __LINE__); + } + $this->TitelTekst = $titelTekst; + + return $this; + } + /** + * Get UUIDIdentifikator value + * @return string|null + */ + public function getUUIDIdentifikator(): ?string + { + return $this->UUIDIdentifikator; + } + /** + * Set UUIDIdentifikator value + * @param string $uUIDIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DokumentParametreType + */ + public function setUUIDIdentifikator(?string $uUIDIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($uUIDIdentifikator) && !is_string($uUIDIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($uUIDIdentifikator, true), gettype($uUIDIdentifikator)), __LINE__); + } + $this->UUIDIdentifikator = $uUIDIdentifikator; + + return $this; + } + /** + * Get BrevDato value + * @return string|null + */ + public function getBrevDato(): ?string + { + return $this->BrevDato; + } + /** + * Set BrevDato value + * @param string $brevDato + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DokumentParametreType + */ + public function setBrevDato(?string $brevDato = null): self + { + // validation for constraint: string + if (!is_null($brevDato) && !is_string($brevDato)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($brevDato, true), gettype($brevDato)), __LINE__); + } + $this->BrevDato = $brevDato; + + return $this; + } + /** + * Get MeddelelsesFormatObjekt value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelsesFormatObjektType|null + */ + public function getMeddelelsesFormatObjekt(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelsesFormatObjektType + { + return $this->MeddelelsesFormatObjekt; + } + /** + * Set MeddelelsesFormatObjekt value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelsesFormatObjektType $meddelelsesFormatObjekt + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DokumentParametreType + */ + public function setMeddelelsesFormatObjekt(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelsesFormatObjektType $meddelelsesFormatObjekt = null): self + { + $this->MeddelelsesFormatObjekt = $meddelelsesFormatObjekt; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ErrorListType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ErrorListType.php new file mode 100644 index 0000000..603b68a --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ErrorListType.php @@ -0,0 +1,97 @@ +setError($error); + } + /** + * Get Error value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorType[] + */ + public function getError(): array + { + return $this->Error; + } + /** + * This method is responsible for validating the values passed to the setError method + * This method is willingly generated in order to preserve the one-line inline validation within the setError method + * @param array $values + * @return string A non-empty message if the values does not match the validation rules + */ + public static function validateErrorForArrayConstraintsFromSetError(array $values = []): string + { + $message = ''; + $invalidValues = []; + foreach ($values as $errorListTypeErrorItem) { + // validation for constraint: itemType + if (!$errorListTypeErrorItem instanceof \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorType) { + $invalidValues[] = is_object($errorListTypeErrorItem) ? get_class($errorListTypeErrorItem) : sprintf('%s(%s)', gettype($errorListTypeErrorItem), var_export($errorListTypeErrorItem, true)); + } + } + if (!empty($invalidValues)) { + $message = sprintf('The Error property can only contain items of type \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); + } + unset($invalidValues); + + return $message; + } + /** + * Set Error value + * @throws InvalidArgumentException + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorType[] $error + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorListType + */ + public function setError(array $error): self + { + // validation for constraint: array + if ('' !== ($errorArrayErrorMessage = self::validateErrorForArrayConstraintsFromSetError($error))) { + throw new InvalidArgumentException($errorArrayErrorMessage, __LINE__); + } + $this->Error = $error; + + return $this; + } + /** + * Add item to Error value + * @throws InvalidArgumentException + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorType $item + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorListType + */ + public function addToError(\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorType $item): self + { + // validation for constraint: itemType + if (!$item instanceof \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorType) { + throw new InvalidArgumentException(sprintf('The Error property can only contain items of type \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); + } + $this->Error[] = $item; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ErrorType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ErrorType.php new file mode 100644 index 0000000..c86d5e5 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ErrorType.php @@ -0,0 +1,91 @@ +setErrorCode($errorCode) + ->setErrorText($errorText); + } + /** + * Get ErrorCode value + * @return string + */ + public function getErrorCode(): string + { + return $this->ErrorCode; + } + /** + * Set ErrorCode value + * @param string $errorCode + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorType + */ + public function setErrorCode(string $errorCode): self + { + // validation for constraint: string + if (!is_null($errorCode) && !is_string($errorCode)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorCode, true), gettype($errorCode)), __LINE__); + } + $this->ErrorCode = $errorCode; + + return $this; + } + /** + * Get ErrorText value + * @return string + */ + public function getErrorText(): string + { + return $this->ErrorText; + } + /** + * Set ErrorText value + * @param string $errorText + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorType + */ + public function setErrorText(string $errorText): self + { + // validation for constraint: string + if (!is_null($errorText) && !is_string($errorText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorText, true), gettype($errorText)), __LINE__); + } + $this->ErrorText = $errorText; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/FejlType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/FejlType.php new file mode 100644 index 0000000..2bbf97f --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/FejlType.php @@ -0,0 +1,146 @@ +setFejlKode($fejlKode) + ->setFejlTekst($fejlTekst) + ->setFejlIdentifikator($fejlIdentifikator); + } + /** + * Get FejlKode value + * @return int|null + */ + public function getFejlKode(): ?int + { + return $this->FejlKode; + } + /** + * Set FejlKode value + * @param int $fejlKode + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\FejlType + */ + public function setFejlKode(?int $fejlKode = null): self + { + // validation for constraint: int + if (!is_null($fejlKode) && !(is_int($fejlKode) || ctype_digit($fejlKode))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($fejlKode, true), gettype($fejlKode)), __LINE__); + } + // validation for constraint: maxInclusive(9999) + if (!is_null($fejlKode) && $fejlKode > 9999) { + throw new InvalidArgumentException(sprintf('Invalid value %s, the value must be numerically less than or equal to 9999', var_export($fejlKode, true)), __LINE__); + } + // validation for constraint: minInclusive(1000) + if (!is_null($fejlKode) && $fejlKode < 1000) { + throw new InvalidArgumentException(sprintf('Invalid value %s, the value must be numerically greater than or equal to 1000', var_export($fejlKode, true)), __LINE__); + } + $this->FejlKode = $fejlKode; + + return $this; + } + /** + * Get FejlTekst value + * @return string|null + */ + public function getFejlTekst(): ?string + { + return $this->FejlTekst; + } + /** + * Set FejlTekst value + * @param string $fejlTekst + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\FejlType + */ + public function setFejlTekst(?string $fejlTekst = null): self + { + // validation for constraint: string + if (!is_null($fejlTekst) && !is_string($fejlTekst)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fejlTekst, true), gettype($fejlTekst)), __LINE__); + } + // validation for constraint: maxLength(2048) + if (!is_null($fejlTekst) && mb_strlen((string) $fejlTekst) > 2048) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 2048', mb_strlen((string) $fejlTekst)), __LINE__); + } + $this->FejlTekst = $fejlTekst; + + return $this; + } + /** + * Get FejlIdentifikator value + * @return string|null + */ + public function getFejlIdentifikator(): ?string + { + return $this->FejlIdentifikator; + } + /** + * Set FejlIdentifikator value + * @param string $fejlIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\FejlType + */ + public function setFejlIdentifikator(?string $fejlIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($fejlIdentifikator) && !is_string($fejlIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fejlIdentifikator, true), gettype($fejlIdentifikator)), __LINE__); + } + // validation for constraint: maxLength(26) + if (!is_null($fejlIdentifikator) && mb_strlen((string) $fejlIdentifikator) > 26) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 26', mb_strlen((string) $fejlIdentifikator)), __LINE__); + } + $this->FejlIdentifikator = $fejlIdentifikator; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseAfsenderType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseAfsenderType.php new file mode 100644 index 0000000..93cbd1c --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseAfsenderType.php @@ -0,0 +1,54 @@ +setAfsenderAdresse($afsenderAdresse); + } + /** + * Get AfsenderAdresse value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType|null + */ + public function getAfsenderAdresse(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + { + return $this->AfsenderAdresse; + } + /** + * Set AfsenderAdresse value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType $afsenderAdresse + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseAfsenderType + */ + public function setAfsenderAdresse(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType $afsenderAdresse = null): self + { + $this->AfsenderAdresse = $afsenderAdresse; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseIType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseIType.php new file mode 100644 index 0000000..834d2cf --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseIType.php @@ -0,0 +1,413 @@ +setAfsendelseIdentifikator($afsendelseIdentifikator) + ->setForsendelseTypeIdentifikator($forsendelseTypeIdentifikator) + ->setForsendelseModtager($forsendelseModtager) + ->setFilformatNavn($filformatNavn) + ->setMeddelelseIndholdData($meddelelseIndholdData) + ->setTransaktionsParametreI($transaktionsParametreI) + ->setDokumentParametre($dokumentParametre) + ->setKanalUafhaengigeParametreI($kanalUafhaengigeParametreI) + ->setPrintParametre($printParametre) + ->setDigitalPostParametre($digitalPostParametre) + ->setPostParametre($postParametre) + ->setBilagSamling($bilagSamling); + } + /** + * Get AfsendelseIdentifikator value + * @return string|null + */ + public function getAfsendelseIdentifikator(): ?string + { + return $this->AfsendelseIdentifikator; + } + /** + * Set AfsendelseIdentifikator value + * @param string $afsendelseIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setAfsendelseIdentifikator(?string $afsendelseIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($afsendelseIdentifikator) && !is_string($afsendelseIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($afsendelseIdentifikator, true), gettype($afsendelseIdentifikator)), __LINE__); + } + // validation for constraint: maxLength(38) + if (!is_null($afsendelseIdentifikator) && mb_strlen((string) $afsendelseIdentifikator) > 38) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 38', mb_strlen((string) $afsendelseIdentifikator)), __LINE__); + } + // validation for constraint: minLength(1) + if (!is_null($afsendelseIdentifikator) && mb_strlen((string) $afsendelseIdentifikator) < 1) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be greater than or equal to 1', mb_strlen((string) $afsendelseIdentifikator)), __LINE__); + } + $this->AfsendelseIdentifikator = $afsendelseIdentifikator; + + return $this; + } + /** + * Get ForsendelseTypeIdentifikator value + * @return int|null + */ + public function getForsendelseTypeIdentifikator(): ?int + { + return $this->ForsendelseTypeIdentifikator; + } + /** + * Set ForsendelseTypeIdentifikator value + * @param int $forsendelseTypeIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setForsendelseTypeIdentifikator(?int $forsendelseTypeIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($forsendelseTypeIdentifikator) && !(is_int($forsendelseTypeIdentifikator) || ctype_digit($forsendelseTypeIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($forsendelseTypeIdentifikator, true), gettype($forsendelseTypeIdentifikator)), __LINE__); + } + $this->ForsendelseTypeIdentifikator = $forsendelseTypeIdentifikator; + + return $this; + } + /** + * Get ForsendelseModtager value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseModtagerType|null + */ + public function getForsendelseModtager(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseModtagerType + { + return $this->ForsendelseModtager; + } + /** + * Set ForsendelseModtager value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseModtagerType $forsendelseModtager + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setForsendelseModtager(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseModtagerType $forsendelseModtager = null): self + { + $this->ForsendelseModtager = $forsendelseModtager; + + return $this; + } + /** + * Get FilformatNavn value + * @return string|null + */ + public function getFilformatNavn(): ?string + { + return $this->FilformatNavn; + } + /** + * Set FilformatNavn value + * @param string $filformatNavn + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setFilformatNavn(?string $filformatNavn = null): self + { + // validation for constraint: string + if (!is_null($filformatNavn) && !is_string($filformatNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($filformatNavn, true), gettype($filformatNavn)), __LINE__); + } + // validation for constraint: maxLength(10) + if (!is_null($filformatNavn) && mb_strlen((string) $filformatNavn) > 10) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 10', mb_strlen((string) $filformatNavn)), __LINE__); + } + $this->FilformatNavn = $filformatNavn; + + return $this; + } + /** + * Get MeddelelseIndholdData value + * @return string|null + */ + public function getMeddelelseIndholdData(): ?string + { + return $this->MeddelelseIndholdData; + } + /** + * Set MeddelelseIndholdData value + * @param string $meddelelseIndholdData + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setMeddelelseIndholdData(?string $meddelelseIndholdData = null): self + { + // validation for constraint: string + if (!is_null($meddelelseIndholdData) && !is_string($meddelelseIndholdData)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($meddelelseIndholdData, true), gettype($meddelelseIndholdData)), __LINE__); + } + $this->MeddelelseIndholdData = $meddelelseIndholdData; + + return $this; + } + /** + * Get TransaktionsParametreI value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TransaktionsParametreIType|null + */ + public function getTransaktionsParametreI(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TransaktionsParametreIType + { + return $this->TransaktionsParametreI; + } + /** + * Set TransaktionsParametreI value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TransaktionsParametreIType $transaktionsParametreI + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setTransaktionsParametreI(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TransaktionsParametreIType $transaktionsParametreI = null): self + { + $this->TransaktionsParametreI = $transaktionsParametreI; + + return $this; + } + /** + * Get DokumentParametre value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DokumentParametreType|null + */ + public function getDokumentParametre(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DokumentParametreType + { + return $this->DokumentParametre; + } + /** + * Set DokumentParametre value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DokumentParametreType $dokumentParametre + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setDokumentParametre(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DokumentParametreType $dokumentParametre = null): self + { + $this->DokumentParametre = $dokumentParametre; + + return $this; + } + /** + * Get KanalUafhaengigeParametreI value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType|null + */ + public function getKanalUafhaengigeParametreI(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType + { + return $this->KanalUafhaengigeParametreI; + } + /** + * Set KanalUafhaengigeParametreI value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType $kanalUafhaengigeParametreI + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setKanalUafhaengigeParametreI(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType $kanalUafhaengigeParametreI = null): self + { + $this->KanalUafhaengigeParametreI = $kanalUafhaengigeParametreI; + + return $this; + } + /** + * Get PrintParametre value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintParametreType|null + */ + public function getPrintParametre(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintParametreType + { + return $this->PrintParametre; + } + /** + * Set PrintParametre value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintParametreType $printParametre + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setPrintParametre(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintParametreType $printParametre = null): self + { + $this->PrintParametre = $printParametre; + + return $this; + } + /** + * Get DigitalPostParametre value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DigitalPostParametreType|null + */ + public function getDigitalPostParametre(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DigitalPostParametreType + { + return $this->DigitalPostParametre; + } + /** + * Set DigitalPostParametre value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DigitalPostParametreType $digitalPostParametre + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setDigitalPostParametre(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\DigitalPostParametreType $digitalPostParametre = null): self + { + $this->DigitalPostParametre = $digitalPostParametre; + + return $this; + } + /** + * Get PostParametre value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PostParametreType|null + */ + public function getPostParametre(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PostParametreType + { + return $this->PostParametre; + } + /** + * Set PostParametre value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PostParametreType $postParametre + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setPostParametre(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PostParametreType $postParametre = null): self + { + $this->PostParametre = $postParametre; + + return $this; + } + /** + * Get BilagSamling value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagSamlingType|null + */ + public function getBilagSamling(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagSamlingType + { + return $this->BilagSamling; + } + /** + * Set BilagSamling value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagSamlingType $bilagSamling + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseIType + */ + public function setBilagSamling(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BilagSamlingType $bilagSamling = null): self + { + $this->BilagSamling = $bilagSamling; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseModtagerType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseModtagerType.php new file mode 100644 index 0000000..e80aaca --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ForsendelseModtagerType.php @@ -0,0 +1,85 @@ +setAfsendelseModtager($afsendelseModtager) + ->setModtagerAdresse($modtagerAdresse); + } + /** + * Get AfsendelseModtager value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\SlutbrugerIdentitetType|null + */ + public function getAfsendelseModtager(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\SlutbrugerIdentitetType + { + return $this->AfsendelseModtager; + } + /** + * Set AfsendelseModtager value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\SlutbrugerIdentitetType $afsendelseModtager + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseModtagerType + */ + public function setAfsendelseModtager(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\SlutbrugerIdentitetType $afsendelseModtager = null): self + { + $this->AfsendelseModtager = $afsendelseModtager; + + return $this; + } + /** + * Get ModtagerAdresse value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType|null + */ + public function getModtagerAdresse(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + { + return $this->ModtagerAdresse; + } + /** + * Set ModtagerAdresse value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType $modtagerAdresse + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseModtagerType + */ + public function setModtagerAdresse(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType $modtagerAdresse = null): self + { + $this->ModtagerAdresse = $modtagerAdresse; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/InvocationContextType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/InvocationContextType.php new file mode 100644 index 0000000..8dfbf7e --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/InvocationContextType.php @@ -0,0 +1,310 @@ +setServiceAgreementUUID($serviceAgreementUUID) + ->setUserSystemUUID($userSystemUUID) + ->setUserUUID($userUUID) + ->setServiceUUID($serviceUUID) + ->setOnBehalfOfUser($onBehalfOfUser) + ->setCallersServiceCallIdentifier($callersServiceCallIdentifier) + ->setAccountingInfo($accountingInfo); + } + /** + * Get ServiceAgreementUUID value + * @return string + */ + public function getServiceAgreementUUID(): string + { + return $this->ServiceAgreementUUID; + } + /** + * Set ServiceAgreementUUID value + * @param string $serviceAgreementUUID + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType + */ + public function setServiceAgreementUUID(string $serviceAgreementUUID): self + { + // validation for constraint: string + if (!is_null($serviceAgreementUUID) && !is_string($serviceAgreementUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($serviceAgreementUUID, true), gettype($serviceAgreementUUID)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($serviceAgreementUUID) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $serviceAgreementUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($serviceAgreementUUID, true)), __LINE__); + } + $this->ServiceAgreementUUID = $serviceAgreementUUID; + + return $this; + } + /** + * Get UserSystemUUID value + * @return string + */ + public function getUserSystemUUID(): string + { + return $this->UserSystemUUID; + } + /** + * Set UserSystemUUID value + * @param string $userSystemUUID + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType + */ + public function setUserSystemUUID(string $userSystemUUID): self + { + // validation for constraint: string + if (!is_null($userSystemUUID) && !is_string($userSystemUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($userSystemUUID, true), gettype($userSystemUUID)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($userSystemUUID) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $userSystemUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($userSystemUUID, true)), __LINE__); + } + $this->UserSystemUUID = $userSystemUUID; + + return $this; + } + /** + * Get UserUUID value + * @return string + */ + public function getUserUUID(): string + { + return $this->UserUUID; + } + /** + * Set UserUUID value + * @param string $userUUID + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType + */ + public function setUserUUID(string $userUUID): self + { + // validation for constraint: string + if (!is_null($userUUID) && !is_string($userUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($userUUID, true), gettype($userUUID)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($userUUID) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $userUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($userUUID, true)), __LINE__); + } + $this->UserUUID = $userUUID; + + return $this; + } + /** + * Get ServiceUUID value + * @return string + */ + public function getServiceUUID(): string + { + return $this->ServiceUUID; + } + /** + * Set ServiceUUID value + * @param string $serviceUUID + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType + */ + public function setServiceUUID(string $serviceUUID): self + { + // validation for constraint: string + if (!is_null($serviceUUID) && !is_string($serviceUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($serviceUUID, true), gettype($serviceUUID)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($serviceUUID) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $serviceUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($serviceUUID, true)), __LINE__); + } + $this->ServiceUUID = $serviceUUID; + + return $this; + } + /** + * Get OnBehalfOfUser value + * @return string|null + */ + public function getOnBehalfOfUser(): ?string + { + return $this->OnBehalfOfUser; + } + /** + * Set OnBehalfOfUser value + * @param string $onBehalfOfUser + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType + */ + public function setOnBehalfOfUser(?string $onBehalfOfUser = null): self + { + // validation for constraint: string + if (!is_null($onBehalfOfUser) && !is_string($onBehalfOfUser)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($onBehalfOfUser, true), gettype($onBehalfOfUser)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($onBehalfOfUser) && mb_strlen((string) $onBehalfOfUser) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $onBehalfOfUser)), __LINE__); + } + $this->OnBehalfOfUser = $onBehalfOfUser; + + return $this; + } + /** + * Get CallersServiceCallIdentifier value + * @return string|null + */ + public function getCallersServiceCallIdentifier(): ?string + { + return $this->CallersServiceCallIdentifier; + } + /** + * Set CallersServiceCallIdentifier value + * @param string $callersServiceCallIdentifier + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType + */ + public function setCallersServiceCallIdentifier(?string $callersServiceCallIdentifier = null): self + { + // validation for constraint: string + if (!is_null($callersServiceCallIdentifier) && !is_string($callersServiceCallIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callersServiceCallIdentifier, true), gettype($callersServiceCallIdentifier)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($callersServiceCallIdentifier) && mb_strlen((string) $callersServiceCallIdentifier) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $callersServiceCallIdentifier)), __LINE__); + } + $this->CallersServiceCallIdentifier = $callersServiceCallIdentifier; + + return $this; + } + /** + * Get AccountingInfo value + * @return string|null + */ + public function getAccountingInfo(): ?string + { + return $this->AccountingInfo; + } + /** + * Set AccountingInfo value + * @param string $accountingInfo + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType + */ + public function setAccountingInfo(?string $accountingInfo = null): self + { + // validation for constraint: string + if (!is_null($accountingInfo) && !is_string($accountingInfo)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($accountingInfo, true), gettype($accountingInfo)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($accountingInfo) && mb_strlen((string) $accountingInfo) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $accountingInfo)), __LINE__); + } + $this->AccountingInfo = $accountingInfo; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/KanalUafhaengigeParametreIType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/KanalUafhaengigeParametreIType.php new file mode 100644 index 0000000..91f0c7a --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/KanalUafhaengigeParametreIType.php @@ -0,0 +1,350 @@ +setEnhedTekst($enhedTekst) + ->setBrugerNavn($brugerNavn) + ->setKonteringsGruppeTekst($konteringsGruppeTekst) + ->setForsendelseAfsender($forsendelseAfsender) + ->setPaatrykAfsenderAdresseIndikator($paatrykAfsenderAdresseIndikator) + ->setPaatrykModtagerAdresseIndikator($paatrykModtagerAdresseIndikator) + ->setPaatrykBrevdatoIndikator($paatrykBrevdatoIndikator) + ->setKanalKode($kanalKode) + ->setHasteBrevIndikator($hasteBrevIndikator); + } + /** + * Get EnhedTekst value + * @return string|null + */ + public function getEnhedTekst(): ?string + { + return $this->EnhedTekst; + } + /** + * Set EnhedTekst value + * @param string $enhedTekst + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType + */ + public function setEnhedTekst(?string $enhedTekst = null): self + { + // validation for constraint: string + if (!is_null($enhedTekst) && !is_string($enhedTekst)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($enhedTekst, true), gettype($enhedTekst)), __LINE__); + } + // validation for constraint: maxLength(2000) + if (!is_null($enhedTekst) && mb_strlen((string) $enhedTekst) > 2000) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 2000', mb_strlen((string) $enhedTekst)), __LINE__); + } + $this->EnhedTekst = $enhedTekst; + + return $this; + } + /** + * Get BrugerNavn value + * @return string|null + */ + public function getBrugerNavn(): ?string + { + return $this->BrugerNavn; + } + /** + * Set BrugerNavn value + * @param string $brugerNavn + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType + */ + public function setBrugerNavn(?string $brugerNavn = null): self + { + // validation for constraint: string + if (!is_null($brugerNavn) && !is_string($brugerNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($brugerNavn, true), gettype($brugerNavn)), __LINE__); + } + // validation for constraint: maxLength(2000) + if (!is_null($brugerNavn) && mb_strlen((string) $brugerNavn) > 2000) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 2000', mb_strlen((string) $brugerNavn)), __LINE__); + } + // validation for constraint: minLength(1) + if (!is_null($brugerNavn) && mb_strlen((string) $brugerNavn) < 1) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be greater than or equal to 1', mb_strlen((string) $brugerNavn)), __LINE__); + } + $this->BrugerNavn = $brugerNavn; + + return $this; + } + /** + * Get KonteringsGruppeTekst value + * @return string|null + */ + public function getKonteringsGruppeTekst(): ?string + { + return $this->KonteringsGruppeTekst; + } + /** + * Set KonteringsGruppeTekst value + * @param string $konteringsGruppeTekst + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType + */ + public function setKonteringsGruppeTekst(?string $konteringsGruppeTekst = null): self + { + // validation for constraint: string + if (!is_null($konteringsGruppeTekst) && !is_string($konteringsGruppeTekst)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($konteringsGruppeTekst, true), gettype($konteringsGruppeTekst)), __LINE__); + } + // validation for constraint: maxLength(2000) + if (!is_null($konteringsGruppeTekst) && mb_strlen((string) $konteringsGruppeTekst) > 2000) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 2000', mb_strlen((string) $konteringsGruppeTekst)), __LINE__); + } + $this->KonteringsGruppeTekst = $konteringsGruppeTekst; + + return $this; + } + /** + * Get ForsendelseAfsender value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseAfsenderType|null + */ + public function getForsendelseAfsender(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseAfsenderType + { + return $this->ForsendelseAfsender; + } + /** + * Set ForsendelseAfsender value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseAfsenderType $forsendelseAfsender + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType + */ + public function setForsendelseAfsender(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ForsendelseAfsenderType $forsendelseAfsender = null): self + { + $this->ForsendelseAfsender = $forsendelseAfsender; + + return $this; + } + /** + * Get PaatrykAfsenderAdresseIndikator value + * @return bool|null + */ + public function getPaatrykAfsenderAdresseIndikator(): ?bool + { + return $this->PaatrykAfsenderAdresseIndikator; + } + /** + * Set PaatrykAfsenderAdresseIndikator value + * @param bool $paatrykAfsenderAdresseIndikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType + */ + public function setPaatrykAfsenderAdresseIndikator(?bool $paatrykAfsenderAdresseIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($paatrykAfsenderAdresseIndikator) && !is_bool($paatrykAfsenderAdresseIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($paatrykAfsenderAdresseIndikator, true), gettype($paatrykAfsenderAdresseIndikator)), __LINE__); + } + $this->PaatrykAfsenderAdresseIndikator = $paatrykAfsenderAdresseIndikator; + + return $this; + } + /** + * Get PaatrykModtagerAdresseIndikator value + * @return bool|null + */ + public function getPaatrykModtagerAdresseIndikator(): ?bool + { + return $this->PaatrykModtagerAdresseIndikator; + } + /** + * Set PaatrykModtagerAdresseIndikator value + * @param bool $paatrykModtagerAdresseIndikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType + */ + public function setPaatrykModtagerAdresseIndikator(?bool $paatrykModtagerAdresseIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($paatrykModtagerAdresseIndikator) && !is_bool($paatrykModtagerAdresseIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($paatrykModtagerAdresseIndikator, true), gettype($paatrykModtagerAdresseIndikator)), __LINE__); + } + $this->PaatrykModtagerAdresseIndikator = $paatrykModtagerAdresseIndikator; + + return $this; + } + /** + * Get PaatrykBrevdatoIndikator value + * @return bool|null + */ + public function getPaatrykBrevdatoIndikator(): ?bool + { + return $this->PaatrykBrevdatoIndikator; + } + /** + * Set PaatrykBrevdatoIndikator value + * @param bool $paatrykBrevdatoIndikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType + */ + public function setPaatrykBrevdatoIndikator(?bool $paatrykBrevdatoIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($paatrykBrevdatoIndikator) && !is_bool($paatrykBrevdatoIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($paatrykBrevdatoIndikator, true), gettype($paatrykBrevdatoIndikator)), __LINE__); + } + $this->PaatrykBrevdatoIndikator = $paatrykBrevdatoIndikator; + + return $this; + } + /** + * Get KanalKode value + * @return string|null + */ + public function getKanalKode(): ?string + { + return $this->KanalKode; + } + /** + * Set KanalKode value + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KanalKodeType::valueIsValid() + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KanalKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $kanalKode + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType + */ + public function setKanalKode(?string $kanalKode = null): self + { + // validation for constraint: enumeration + if (!\ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KanalKodeType::valueIsValid($kanalKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KanalKodeType', is_array($kanalKode) ? implode(', ', $kanalKode) : var_export($kanalKode, true), implode(', ', \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KanalKodeType::getValidValues())), __LINE__); + } + $this->KanalKode = $kanalKode; + + return $this; + } + /** + * Get HasteBrevIndikator value + * @return bool|null + */ + public function getHasteBrevIndikator(): ?bool + { + return $this->HasteBrevIndikator; + } + /** + * Set HasteBrevIndikator value + * @param bool $hasteBrevIndikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KanalUafhaengigeParametreIType + */ + public function setHasteBrevIndikator(?bool $hasteBrevIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($hasteBrevIndikator) && !is_bool($hasteBrevIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($hasteBrevIndikator, true), gettype($hasteBrevIndikator)), __LINE__); + } + $this->HasteBrevIndikator = $hasteBrevIndikator; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/KontaktOplysningType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/KontaktOplysningType.php new file mode 100644 index 0000000..297521a --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/KontaktOplysningType.php @@ -0,0 +1,1475 @@ +setPersonName($personName) + ->setCoNavn($coNavn) + ->setStreetName($streetName) + ->setStreetBuildingIdentifier($streetBuildingIdentifier) + ->setFloorIdentifier($floorIdentifier) + ->setSuiteIdentifier($suiteIdentifier) + ->setMailDeliverySublocationIdentifier($mailDeliverySublocationIdentifier) + ->setPostCodeIdentifier($postCodeIdentifier) + ->setDistrictSubdivisionIdentifier($districtSubdivisionIdentifier) + ->setPostOfficeBoxIdentifier($postOfficeBoxIdentifier) + ->setPostalAddressFirstLineText($postalAddressFirstLineText) + ->setPostalAddressSecondLineText($postalAddressSecondLineText) + ->setPostalAddressThirdLineText($postalAddressThirdLineText) + ->setPostalAddressFourthLineText($postalAddressFourthLineText) + ->setPostalAddressFifthLineText($postalAddressFifthLineText) + ->setPostalAddressSixthLineText($postalAddressSixthLineText) + ->setCountryIdentificationCode($countryIdentificationCode); + } + /** + * Get PersonName value + * @return string|null + */ + public function getPersonName(): ?string + { + return $this->PersonName; + } + /** + * Set PersonName value + * @param string $personName + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setPersonName(?string $personName = null): self + { + // validation for constraint: string + if (!is_null($personName) && !is_string($personName)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($personName, true), gettype($personName)), __LINE__); + } + $this->PersonName = $personName; + + return $this; + } + /** + * Get CoNavn value + * @return string|null + */ + public function getCoNavn(): ?string + { + return isset($this->CoNavn) ? $this->CoNavn : null; + } + /** + * This method is responsible for validating the value passed to the setCoNavn method + * This method is willingly generated in order to preserve the one-line inline validation within the setCoNavn method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateCoNavnForChoiceConstraintsFromSetCoNavn($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property CoNavn can\'t be set as the property %s is already set. Only one property must be set among these properties: CoNavn, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set CoNavn value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $coNavn + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setCoNavn(?string $coNavn = null): self + { + // validation for constraint: string + if (!is_null($coNavn) && !is_string($coNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($coNavn, true), gettype($coNavn)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($coNavnChoiceErrorMessage = self::validateCoNavnForChoiceConstraintsFromSetCoNavn($coNavn))) { + throw new InvalidArgumentException($coNavnChoiceErrorMessage, __LINE__); + } + if (is_null($coNavn) || (is_array($coNavn) && empty($coNavn))) { + unset($this->CoNavn); + } else { + $this->CoNavn = $coNavn; + } + + return $this; + } + /** + * Get StreetName value + * @return string|null + */ + public function getStreetName(): ?string + { + return isset($this->StreetName) ? $this->StreetName : null; + } + /** + * This method is responsible for validating the value passed to the setStreetName method + * This method is willingly generated in order to preserve the one-line inline validation within the setStreetName method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateStreetNameForChoiceConstraintsFromSetStreetName($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property StreetName can\'t be set as the property %s is already set. Only one property must be set among these properties: StreetName, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set StreetName value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $streetName + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setStreetName(?string $streetName = null): self + { + // validation for constraint: string + if (!is_null($streetName) && !is_string($streetName)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($streetName, true), gettype($streetName)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($streetNameChoiceErrorMessage = self::validateStreetNameForChoiceConstraintsFromSetStreetName($streetName))) { + throw new InvalidArgumentException($streetNameChoiceErrorMessage, __LINE__); + } + if (is_null($streetName) || (is_array($streetName) && empty($streetName))) { + unset($this->StreetName); + } else { + $this->StreetName = $streetName; + } + + return $this; + } + /** + * Get StreetBuildingIdentifier value + * @return string|null + */ + public function getStreetBuildingIdentifier(): ?string + { + return isset($this->StreetBuildingIdentifier) ? $this->StreetBuildingIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setStreetBuildingIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setStreetBuildingIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateStreetBuildingIdentifierForChoiceConstraintsFromSetStreetBuildingIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property StreetBuildingIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: StreetBuildingIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set StreetBuildingIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $streetBuildingIdentifier + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setStreetBuildingIdentifier(?string $streetBuildingIdentifier = null): self + { + // validation for constraint: string + if (!is_null($streetBuildingIdentifier) && !is_string($streetBuildingIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($streetBuildingIdentifier, true), gettype($streetBuildingIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($streetBuildingIdentifierChoiceErrorMessage = self::validateStreetBuildingIdentifierForChoiceConstraintsFromSetStreetBuildingIdentifier($streetBuildingIdentifier))) { + throw new InvalidArgumentException($streetBuildingIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($streetBuildingIdentifier) || (is_array($streetBuildingIdentifier) && empty($streetBuildingIdentifier))) { + unset($this->StreetBuildingIdentifier); + } else { + $this->StreetBuildingIdentifier = $streetBuildingIdentifier; + } + + return $this; + } + /** + * Get FloorIdentifier value + * @return string|null + */ + public function getFloorIdentifier(): ?string + { + return isset($this->FloorIdentifier) ? $this->FloorIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setFloorIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setFloorIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateFloorIdentifierForChoiceConstraintsFromSetFloorIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property FloorIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: FloorIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set FloorIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $floorIdentifier + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setFloorIdentifier(?string $floorIdentifier = null): self + { + // validation for constraint: string + if (!is_null($floorIdentifier) && !is_string($floorIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($floorIdentifier, true), gettype($floorIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($floorIdentifierChoiceErrorMessage = self::validateFloorIdentifierForChoiceConstraintsFromSetFloorIdentifier($floorIdentifier))) { + throw new InvalidArgumentException($floorIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($floorIdentifier) || (is_array($floorIdentifier) && empty($floorIdentifier))) { + unset($this->FloorIdentifier); + } else { + $this->FloorIdentifier = $floorIdentifier; + } + + return $this; + } + /** + * Get SuiteIdentifier value + * @return string|null + */ + public function getSuiteIdentifier(): ?string + { + return isset($this->SuiteIdentifier) ? $this->SuiteIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setSuiteIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setSuiteIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateSuiteIdentifierForChoiceConstraintsFromSetSuiteIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property SuiteIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: SuiteIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set SuiteIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $suiteIdentifier + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setSuiteIdentifier(?string $suiteIdentifier = null): self + { + // validation for constraint: string + if (!is_null($suiteIdentifier) && !is_string($suiteIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($suiteIdentifier, true), gettype($suiteIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($suiteIdentifierChoiceErrorMessage = self::validateSuiteIdentifierForChoiceConstraintsFromSetSuiteIdentifier($suiteIdentifier))) { + throw new InvalidArgumentException($suiteIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($suiteIdentifier) || (is_array($suiteIdentifier) && empty($suiteIdentifier))) { + unset($this->SuiteIdentifier); + } else { + $this->SuiteIdentifier = $suiteIdentifier; + } + + return $this; + } + /** + * Get MailDeliverySublocationIdentifier value + * @return string|null + */ + public function getMailDeliverySublocationIdentifier(): ?string + { + return isset($this->MailDeliverySublocationIdentifier) ? $this->MailDeliverySublocationIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setMailDeliverySublocationIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setMailDeliverySublocationIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateMailDeliverySublocationIdentifierForChoiceConstraintsFromSetMailDeliverySublocationIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property MailDeliverySublocationIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: MailDeliverySublocationIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set MailDeliverySublocationIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $mailDeliverySublocationIdentifier + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setMailDeliverySublocationIdentifier(?string $mailDeliverySublocationIdentifier = null): self + { + // validation for constraint: string + if (!is_null($mailDeliverySublocationIdentifier) && !is_string($mailDeliverySublocationIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($mailDeliverySublocationIdentifier, true), gettype($mailDeliverySublocationIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($mailDeliverySublocationIdentifierChoiceErrorMessage = self::validateMailDeliverySublocationIdentifierForChoiceConstraintsFromSetMailDeliverySublocationIdentifier($mailDeliverySublocationIdentifier))) { + throw new InvalidArgumentException($mailDeliverySublocationIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($mailDeliverySublocationIdentifier) || (is_array($mailDeliverySublocationIdentifier) && empty($mailDeliverySublocationIdentifier))) { + unset($this->MailDeliverySublocationIdentifier); + } else { + $this->MailDeliverySublocationIdentifier = $mailDeliverySublocationIdentifier; + } + + return $this; + } + /** + * Get PostCodeIdentifier value + * @return string|null + */ + public function getPostCodeIdentifier(): ?string + { + return isset($this->PostCodeIdentifier) ? $this->PostCodeIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setPostCodeIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostCodeIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostCodeIdentifierForChoiceConstraintsFromSetPostCodeIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostCodeIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: PostCodeIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostCodeIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postCodeIdentifier + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setPostCodeIdentifier(?string $postCodeIdentifier = null): self + { + // validation for constraint: string + if (!is_null($postCodeIdentifier) && !is_string($postCodeIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postCodeIdentifier, true), gettype($postCodeIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postCodeIdentifierChoiceErrorMessage = self::validatePostCodeIdentifierForChoiceConstraintsFromSetPostCodeIdentifier($postCodeIdentifier))) { + throw new InvalidArgumentException($postCodeIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($postCodeIdentifier) || (is_array($postCodeIdentifier) && empty($postCodeIdentifier))) { + unset($this->PostCodeIdentifier); + } else { + $this->PostCodeIdentifier = $postCodeIdentifier; + } + + return $this; + } + /** + * Get DistrictSubdivisionIdentifier value + * @return string|null + */ + public function getDistrictSubdivisionIdentifier(): ?string + { + return isset($this->DistrictSubdivisionIdentifier) ? $this->DistrictSubdivisionIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setDistrictSubdivisionIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setDistrictSubdivisionIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateDistrictSubdivisionIdentifierForChoiceConstraintsFromSetDistrictSubdivisionIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property DistrictSubdivisionIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: DistrictSubdivisionIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set DistrictSubdivisionIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $districtSubdivisionIdentifier + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setDistrictSubdivisionIdentifier(?string $districtSubdivisionIdentifier = null): self + { + // validation for constraint: string + if (!is_null($districtSubdivisionIdentifier) && !is_string($districtSubdivisionIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($districtSubdivisionIdentifier, true), gettype($districtSubdivisionIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($districtSubdivisionIdentifierChoiceErrorMessage = self::validateDistrictSubdivisionIdentifierForChoiceConstraintsFromSetDistrictSubdivisionIdentifier($districtSubdivisionIdentifier))) { + throw new InvalidArgumentException($districtSubdivisionIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($districtSubdivisionIdentifier) || (is_array($districtSubdivisionIdentifier) && empty($districtSubdivisionIdentifier))) { + unset($this->DistrictSubdivisionIdentifier); + } else { + $this->DistrictSubdivisionIdentifier = $districtSubdivisionIdentifier; + } + + return $this; + } + /** + * Get PostOfficeBoxIdentifier value + * @return int|null + */ + public function getPostOfficeBoxIdentifier(): ?int + { + return isset($this->PostOfficeBoxIdentifier) ? $this->PostOfficeBoxIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setPostOfficeBoxIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostOfficeBoxIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostOfficeBoxIdentifierForChoiceConstraintsFromSetPostOfficeBoxIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostOfficeBoxIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: PostOfficeBoxIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostOfficeBoxIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param int $postOfficeBoxIdentifier + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setPostOfficeBoxIdentifier(?int $postOfficeBoxIdentifier = null): self + { + // validation for constraint: int + if (!is_null($postOfficeBoxIdentifier) && !(is_int($postOfficeBoxIdentifier) || ctype_digit($postOfficeBoxIdentifier))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($postOfficeBoxIdentifier, true), gettype($postOfficeBoxIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postOfficeBoxIdentifierChoiceErrorMessage = self::validatePostOfficeBoxIdentifierForChoiceConstraintsFromSetPostOfficeBoxIdentifier($postOfficeBoxIdentifier))) { + throw new InvalidArgumentException($postOfficeBoxIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($postOfficeBoxIdentifier) || (is_array($postOfficeBoxIdentifier) && empty($postOfficeBoxIdentifier))) { + unset($this->PostOfficeBoxIdentifier); + } else { + $this->PostOfficeBoxIdentifier = $postOfficeBoxIdentifier; + } + + return $this; + } + /** + * Get PostalAddressFirstLineText value + * @return string|null + */ + public function getPostalAddressFirstLineText(): ?string + { + return isset($this->PostalAddressFirstLineText) ? $this->PostalAddressFirstLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressFirstLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressFirstLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressFirstLineTextForChoiceConstraintsFromSetPostalAddressFirstLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressFirstLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressFirstLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressFirstLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressFirstLineText + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setPostalAddressFirstLineText(?string $postalAddressFirstLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressFirstLineText) && !is_string($postalAddressFirstLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressFirstLineText, true), gettype($postalAddressFirstLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressFirstLineTextChoiceErrorMessage = self::validatePostalAddressFirstLineTextForChoiceConstraintsFromSetPostalAddressFirstLineText($postalAddressFirstLineText))) { + throw new InvalidArgumentException($postalAddressFirstLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressFirstLineText) || (is_array($postalAddressFirstLineText) && empty($postalAddressFirstLineText))) { + unset($this->PostalAddressFirstLineText); + } else { + $this->PostalAddressFirstLineText = $postalAddressFirstLineText; + } + + return $this; + } + /** + * Get PostalAddressSecondLineText value + * @return string|null + */ + public function getPostalAddressSecondLineText(): ?string + { + return isset($this->PostalAddressSecondLineText) ? $this->PostalAddressSecondLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressSecondLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressSecondLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressSecondLineTextForChoiceConstraintsFromSetPostalAddressSecondLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressSecondLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressSecondLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressSecondLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressSecondLineText + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setPostalAddressSecondLineText(?string $postalAddressSecondLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressSecondLineText) && !is_string($postalAddressSecondLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressSecondLineText, true), gettype($postalAddressSecondLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressSecondLineTextChoiceErrorMessage = self::validatePostalAddressSecondLineTextForChoiceConstraintsFromSetPostalAddressSecondLineText($postalAddressSecondLineText))) { + throw new InvalidArgumentException($postalAddressSecondLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressSecondLineText) || (is_array($postalAddressSecondLineText) && empty($postalAddressSecondLineText))) { + unset($this->PostalAddressSecondLineText); + } else { + $this->PostalAddressSecondLineText = $postalAddressSecondLineText; + } + + return $this; + } + /** + * Get PostalAddressThirdLineText value + * @return string|null + */ + public function getPostalAddressThirdLineText(): ?string + { + return isset($this->PostalAddressThirdLineText) ? $this->PostalAddressThirdLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressThirdLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressThirdLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressThirdLineTextForChoiceConstraintsFromSetPostalAddressThirdLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressThirdLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressThirdLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressThirdLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressThirdLineText + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setPostalAddressThirdLineText(?string $postalAddressThirdLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressThirdLineText) && !is_string($postalAddressThirdLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressThirdLineText, true), gettype($postalAddressThirdLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressThirdLineTextChoiceErrorMessage = self::validatePostalAddressThirdLineTextForChoiceConstraintsFromSetPostalAddressThirdLineText($postalAddressThirdLineText))) { + throw new InvalidArgumentException($postalAddressThirdLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressThirdLineText) || (is_array($postalAddressThirdLineText) && empty($postalAddressThirdLineText))) { + unset($this->PostalAddressThirdLineText); + } else { + $this->PostalAddressThirdLineText = $postalAddressThirdLineText; + } + + return $this; + } + /** + * Get PostalAddressFourthLineText value + * @return string|null + */ + public function getPostalAddressFourthLineText(): ?string + { + return isset($this->PostalAddressFourthLineText) ? $this->PostalAddressFourthLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressFourthLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressFourthLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressFourthLineTextForChoiceConstraintsFromSetPostalAddressFourthLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressFourthLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressFourthLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressFourthLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressFourthLineText + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setPostalAddressFourthLineText(?string $postalAddressFourthLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressFourthLineText) && !is_string($postalAddressFourthLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressFourthLineText, true), gettype($postalAddressFourthLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressFourthLineTextChoiceErrorMessage = self::validatePostalAddressFourthLineTextForChoiceConstraintsFromSetPostalAddressFourthLineText($postalAddressFourthLineText))) { + throw new InvalidArgumentException($postalAddressFourthLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressFourthLineText) || (is_array($postalAddressFourthLineText) && empty($postalAddressFourthLineText))) { + unset($this->PostalAddressFourthLineText); + } else { + $this->PostalAddressFourthLineText = $postalAddressFourthLineText; + } + + return $this; + } + /** + * Get PostalAddressFifthLineText value + * @return string|null + */ + public function getPostalAddressFifthLineText(): ?string + { + return isset($this->PostalAddressFifthLineText) ? $this->PostalAddressFifthLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressFifthLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressFifthLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressFifthLineTextForChoiceConstraintsFromSetPostalAddressFifthLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressFifthLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressFifthLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressFifthLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressFifthLineText + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setPostalAddressFifthLineText(?string $postalAddressFifthLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressFifthLineText) && !is_string($postalAddressFifthLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressFifthLineText, true), gettype($postalAddressFifthLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressFifthLineTextChoiceErrorMessage = self::validatePostalAddressFifthLineTextForChoiceConstraintsFromSetPostalAddressFifthLineText($postalAddressFifthLineText))) { + throw new InvalidArgumentException($postalAddressFifthLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressFifthLineText) || (is_array($postalAddressFifthLineText) && empty($postalAddressFifthLineText))) { + unset($this->PostalAddressFifthLineText); + } else { + $this->PostalAddressFifthLineText = $postalAddressFifthLineText; + } + + return $this; + } + /** + * Get PostalAddressSixthLineText value + * @return string|null + */ + public function getPostalAddressSixthLineText(): ?string + { + return isset($this->PostalAddressSixthLineText) ? $this->PostalAddressSixthLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressSixthLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressSixthLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressSixthLineTextForChoiceConstraintsFromSetPostalAddressSixthLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressSixthLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressSixthLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressSixthLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressSixthLineText + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setPostalAddressSixthLineText(?string $postalAddressSixthLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressSixthLineText) && !is_string($postalAddressSixthLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressSixthLineText, true), gettype($postalAddressSixthLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressSixthLineTextChoiceErrorMessage = self::validatePostalAddressSixthLineTextForChoiceConstraintsFromSetPostalAddressSixthLineText($postalAddressSixthLineText))) { + throw new InvalidArgumentException($postalAddressSixthLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressSixthLineText) || (is_array($postalAddressSixthLineText) && empty($postalAddressSixthLineText))) { + unset($this->PostalAddressSixthLineText); + } else { + $this->PostalAddressSixthLineText = $postalAddressSixthLineText; + } + + return $this; + } + /** + * Get CountryIdentificationCode value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CountryIdentificationCodeType|null + */ + public function getCountryIdentificationCode(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CountryIdentificationCodeType + { + return $this->CountryIdentificationCode; + } + /** + * Set CountryIdentificationCode value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CountryIdentificationCodeType $countryIdentificationCode + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\KontaktOplysningType + */ + public function setCountryIdentificationCode(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CountryIdentificationCodeType $countryIdentificationCode = null): self + { + $this->CountryIdentificationCode = $countryIdentificationCode; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/MeddelelseFESDmetadataType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/MeddelelseFESDmetadataType.php new file mode 100644 index 0000000..204569d --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/MeddelelseFESDmetadataType.php @@ -0,0 +1,183 @@ +setFESDdokumentIdentifikator($fESDdokumentIdentifikator) + ->setFESDaktoerIdentifikator($fESDaktoerIdentifikator) + ->setFESDsagIdentifikator($fESDsagIdentifikator) + ->setFESDsagsklassifikationIdentifikator($fESDsagsklassifikationIdentifikator); + } + /** + * Get FESDdokumentIdentifikator value + * @return string|null + */ + public function getFESDdokumentIdentifikator(): ?string + { + return $this->FESDdokumentIdentifikator; + } + /** + * Set FESDdokumentIdentifikator value + * @param string $fESDdokumentIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelseFESDmetadataType + */ + public function setFESDdokumentIdentifikator(?string $fESDdokumentIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($fESDdokumentIdentifikator) && !is_string($fESDdokumentIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fESDdokumentIdentifikator, true), gettype($fESDdokumentIdentifikator)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($fESDdokumentIdentifikator) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $fESDdokumentIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($fESDdokumentIdentifikator, true)), __LINE__); + } + $this->FESDdokumentIdentifikator = $fESDdokumentIdentifikator; + + return $this; + } + /** + * Get FESDaktoerIdentifikator value + * @return string|null + */ + public function getFESDaktoerIdentifikator(): ?string + { + return $this->FESDaktoerIdentifikator; + } + /** + * Set FESDaktoerIdentifikator value + * @param string $fESDaktoerIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelseFESDmetadataType + */ + public function setFESDaktoerIdentifikator(?string $fESDaktoerIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($fESDaktoerIdentifikator) && !is_string($fESDaktoerIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fESDaktoerIdentifikator, true), gettype($fESDaktoerIdentifikator)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($fESDaktoerIdentifikator) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $fESDaktoerIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($fESDaktoerIdentifikator, true)), __LINE__); + } + $this->FESDaktoerIdentifikator = $fESDaktoerIdentifikator; + + return $this; + } + /** + * Get FESDsagIdentifikator value + * @return string|null + */ + public function getFESDsagIdentifikator(): ?string + { + return $this->FESDsagIdentifikator; + } + /** + * Set FESDsagIdentifikator value + * @param string $fESDsagIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelseFESDmetadataType + */ + public function setFESDsagIdentifikator(?string $fESDsagIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($fESDsagIdentifikator) && !is_string($fESDsagIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fESDsagIdentifikator, true), gettype($fESDsagIdentifikator)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($fESDsagIdentifikator) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $fESDsagIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($fESDsagIdentifikator, true)), __LINE__); + } + $this->FESDsagIdentifikator = $fESDsagIdentifikator; + + return $this; + } + /** + * Get FESDsagsklassifikationIdentifikator value + * @return string|null + */ + public function getFESDsagsklassifikationIdentifikator(): ?string + { + return $this->FESDsagsklassifikationIdentifikator; + } + /** + * Set FESDsagsklassifikationIdentifikator value + * @param string $fESDsagsklassifikationIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelseFESDmetadataType + */ + public function setFESDsagsklassifikationIdentifikator(?string $fESDsagsklassifikationIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($fESDsagsklassifikationIdentifikator) && !is_string($fESDsagsklassifikationIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fESDsagsklassifikationIdentifikator, true), gettype($fESDsagsklassifikationIdentifikator)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($fESDsagsklassifikationIdentifikator) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $fESDsagsklassifikationIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($fESDsagsklassifikationIdentifikator, true)), __LINE__); + } + $this->FESDsagsklassifikationIdentifikator = $fESDsagsklassifikationIdentifikator; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/MeddelelsesFormatObjektType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/MeddelelsesFormatObjektType.php new file mode 100644 index 0000000..6d881be --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/MeddelelsesFormatObjektType.php @@ -0,0 +1,64 @@ +setAny($any); + } + /** + * Get any value + * @uses \DOMDocument::loadXML() + * @param bool $asString true: returns XML string, false: returns \DOMDocument + * @return \DOMDocument|string|null + */ + public function getAny(bool $asDomDocument = false) + { + $domDocument = null; + if (!empty($this->any) && $asDomDocument) { + $domDocument = new \DOMDocument('1.0', 'UTF-8'); + $domDocument->loadXML($this->any); + } + return $asDomDocument ? $domDocument : $this->any; + } + /** + * Set any value + * @uses \DOMDocument::hasChildNodes() + * @uses \DOMDocument::saveXML() + * @uses \DOMNode::item() + * @param \DOMDocument|string|null $any + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\MeddelelsesFormatObjektType + */ + public function setAny($any = null): self + { + // validation for constraint: xml + if (!is_null($any) && !$any instanceof \DOMDocument && (!is_string($any) || (is_string($any) && (empty($any) || (($anyDoc = new \DOMDocument()) && false === $anyDoc->loadXML($any)))))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a valid XML string', var_export($any, true)), __LINE__); + } + $this->any = ($any instanceof \DOMDocument) ? $any->saveXML($any->hasChildNodes() ? $any->childNodes->item(0) : null) : $any; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PostParametreType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PostParametreType.php new file mode 100644 index 0000000..fbb821f --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PostParametreType.php @@ -0,0 +1,202 @@ +setPostKategoriKode($postKategoriKode) + ->setAllokeringsIdentifikator($allokeringsIdentifikator) + ->setReturposthaandteringHosLeverandoerIndikator($returposthaandteringHosLeverandoerIndikator) + ->setInformationVedAdresseAendringIndikator($informationVedAdresseAendringIndikator) + ->setSideKvantitet($sideKvantitet); + } + /** + * Get PostKategoriKode value + * @return string|null + */ + public function getPostKategoriKode(): ?string + { + return $this->PostKategoriKode; + } + /** + * Set PostKategoriKode value + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\PostKategoriKodeType::valueIsValid() + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\PostKategoriKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $postKategoriKode + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PostParametreType + */ + public function setPostKategoriKode(?string $postKategoriKode = null): self + { + // validation for constraint: enumeration + if (!\ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\PostKategoriKodeType::valueIsValid($postKategoriKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\PostKategoriKodeType', is_array($postKategoriKode) ? implode(', ', $postKategoriKode) : var_export($postKategoriKode, true), implode(', ', \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\PostKategoriKodeType::getValidValues())), __LINE__); + } + $this->PostKategoriKode = $postKategoriKode; + + return $this; + } + /** + * Get AllokeringsIdentifikator value + * @return int|null + */ + public function getAllokeringsIdentifikator(): ?int + { + return $this->AllokeringsIdentifikator; + } + /** + * Set AllokeringsIdentifikator value + * @param int $allokeringsIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PostParametreType + */ + public function setAllokeringsIdentifikator(?int $allokeringsIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($allokeringsIdentifikator) && !(is_int($allokeringsIdentifikator) || ctype_digit($allokeringsIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($allokeringsIdentifikator, true), gettype($allokeringsIdentifikator)), __LINE__); + } + $this->AllokeringsIdentifikator = $allokeringsIdentifikator; + + return $this; + } + /** + * Get ReturposthaandteringHosLeverandoerIndikator value + * @return bool|null + */ + public function getReturposthaandteringHosLeverandoerIndikator(): ?bool + { + return $this->ReturposthaandteringHosLeverandoerIndikator; + } + /** + * Set ReturposthaandteringHosLeverandoerIndikator value + * @param bool $returposthaandteringHosLeverandoerIndikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PostParametreType + */ + public function setReturposthaandteringHosLeverandoerIndikator(?bool $returposthaandteringHosLeverandoerIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($returposthaandteringHosLeverandoerIndikator) && !is_bool($returposthaandteringHosLeverandoerIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($returposthaandteringHosLeverandoerIndikator, true), gettype($returposthaandteringHosLeverandoerIndikator)), __LINE__); + } + $this->ReturposthaandteringHosLeverandoerIndikator = $returposthaandteringHosLeverandoerIndikator; + + return $this; + } + /** + * Get InformationVedAdresseAendringIndikator value + * @return bool|null + */ + public function getInformationVedAdresseAendringIndikator(): ?bool + { + return $this->InformationVedAdresseAendringIndikator; + } + /** + * Set InformationVedAdresseAendringIndikator value + * @param bool $informationVedAdresseAendringIndikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PostParametreType + */ + public function setInformationVedAdresseAendringIndikator(?bool $informationVedAdresseAendringIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($informationVedAdresseAendringIndikator) && !is_bool($informationVedAdresseAendringIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($informationVedAdresseAendringIndikator, true), gettype($informationVedAdresseAendringIndikator)), __LINE__); + } + $this->InformationVedAdresseAendringIndikator = $informationVedAdresseAendringIndikator; + + return $this; + } + /** + * Get SideKvantitet value + * @return int|null + */ + public function getSideKvantitet(): ?int + { + return $this->SideKvantitet; + } + /** + * Set SideKvantitet value + * @param int $sideKvantitet + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PostParametreType + */ + public function setSideKvantitet(?int $sideKvantitet = null): self + { + // validation for constraint: int + if (!is_null($sideKvantitet) && !(is_int($sideKvantitet) || ctype_digit($sideKvantitet))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($sideKvantitet, true), gettype($sideKvantitet)), __LINE__); + } + // validation for constraint: minInclusive + if (!is_null($sideKvantitet) && $sideKvantitet < 0) { + throw new InvalidArgumentException(sprintf('Invalid value %s, the value must be numerically greater than or equal to 0', var_export($sideKvantitet, true)), __LINE__); + } + $this->SideKvantitet = $sideKvantitet; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintAfsendBrevRequestType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintAfsendBrevRequestType.php new file mode 100644 index 0000000..2366a30 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintAfsendBrevRequestType.php @@ -0,0 +1,146 @@ +setBrevSPBody($brevSPBody) + ->setInvocationContext($invocationContext) + ->setAuthorityContext($authorityContext) + ->setCallContext($callContext); + } + /** + * Get BrevSPBody value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BrevSPBodyType + */ + public function getBrevSPBody(): \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BrevSPBodyType + { + return $this->BrevSPBody; + } + /** + * Set BrevSPBody value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BrevSPBodyType $brevSPBody + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintAfsendBrevRequestType + */ + public function setBrevSPBody(\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\BrevSPBodyType $brevSPBody): self + { + $this->BrevSPBody = $brevSPBody; + + return $this; + } + /** + * Get InvocationContext value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType|null + */ + public function getInvocationContext(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType + { + return $this->InvocationContext; + } + /** + * Set InvocationContext value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType $invocationContext + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintAfsendBrevRequestType + */ + public function setInvocationContext(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType $invocationContext = null): self + { + $this->InvocationContext = $invocationContext; + + return $this; + } + /** + * Get AuthorityContext value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\AuthorityContextType|null + */ + public function getAuthorityContext(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\AuthorityContextType + { + return $this->AuthorityContext; + } + /** + * Set AuthorityContext value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\AuthorityContextType $authorityContext + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintAfsendBrevRequestType + */ + public function setAuthorityContext(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\AuthorityContextType $authorityContext = null): self + { + $this->AuthorityContext = $authorityContext; + + return $this; + } + /** + * Get CallContext value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CallContextType|null + */ + public function getCallContext(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CallContextType + { + return $this->CallContext; + } + /** + * Set CallContext value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CallContextType $callContext + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintAfsendBrevRequestType + */ + public function setCallContext(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CallContextType $callContext = null): self + { + $this->CallContext = $callContext; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintAfsendBrevResponseType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintAfsendBrevResponseType.php new file mode 100644 index 0000000..dc24d72 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintAfsendBrevResponseType.php @@ -0,0 +1,57 @@ +setResultat($resultat); + } + /** + * Get resultat value + * @return bool + */ + public function getResultat(): bool + { + return $this->resultat; + } + /** + * Set resultat value + * @param bool $resultat + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintAfsendBrevResponseType + */ + public function setResultat(bool $resultat): self + { + // validation for constraint: boolean + if (!is_null($resultat) && !is_bool($resultat)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($resultat, true), gettype($resultat)), __LINE__); + } + $this->resultat = $resultat; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintParametreType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintParametreType.php new file mode 100644 index 0000000..0167907 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintParametreType.php @@ -0,0 +1,134 @@ +setSimplexDuplexKode($simplexDuplexKode) + ->setFarveSHKode($farveSHKode) + ->setKuvertTypeKode($kuvertTypeKode); + } + /** + * Get SimplexDuplexKode value + * @return string|null + */ + public function getSimplexDuplexKode(): ?string + { + return $this->SimplexDuplexKode; + } + /** + * Set SimplexDuplexKode value + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\SimplexDuplexKodeType::valueIsValid() + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\SimplexDuplexKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $simplexDuplexKode + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintParametreType + */ + public function setSimplexDuplexKode(?string $simplexDuplexKode = null): self + { + // validation for constraint: enumeration + if (!\ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\SimplexDuplexKodeType::valueIsValid($simplexDuplexKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\SimplexDuplexKodeType', is_array($simplexDuplexKode) ? implode(', ', $simplexDuplexKode) : var_export($simplexDuplexKode, true), implode(', ', \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\SimplexDuplexKodeType::getValidValues())), __LINE__); + } + $this->SimplexDuplexKode = $simplexDuplexKode; + + return $this; + } + /** + * Get FarveSHKode value + * @return string|null + */ + public function getFarveSHKode(): ?string + { + return $this->FarveSHKode; + } + /** + * Set FarveSHKode value + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\FarveSHKodeType::valueIsValid() + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\FarveSHKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $farveSHKode + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintParametreType + */ + public function setFarveSHKode(?string $farveSHKode = null): self + { + // validation for constraint: enumeration + if (!\ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\FarveSHKodeType::valueIsValid($farveSHKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\FarveSHKodeType', is_array($farveSHKode) ? implode(', ', $farveSHKode) : var_export($farveSHKode, true), implode(', ', \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\FarveSHKodeType::getValidValues())), __LINE__); + } + $this->FarveSHKode = $farveSHKode; + + return $this; + } + /** + * Get KuvertTypeKode value + * @return string|null + */ + public function getKuvertTypeKode(): ?string + { + return $this->KuvertTypeKode; + } + /** + * Set KuvertTypeKode value + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KuvertTypeKodeType::valueIsValid() + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KuvertTypeKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $kuvertTypeKode + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintParametreType + */ + public function setKuvertTypeKode(?string $kuvertTypeKode = null): self + { + // validation for constraint: enumeration + if (!\ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KuvertTypeKodeType::valueIsValid($kuvertTypeKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KuvertTypeKodeType', is_array($kuvertTypeKode) ? implode(', ', $kuvertTypeKode) : var_export($kuvertTypeKode, true), implode(', ', \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KuvertTypeKodeType::getValidValues())), __LINE__); + } + $this->KuvertTypeKode = $kuvertTypeKode; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintSpoergTilmeldingRequestType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintSpoergTilmeldingRequestType.php new file mode 100644 index 0000000..3b6ce04 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintSpoergTilmeldingRequestType.php @@ -0,0 +1,146 @@ +setTilmeldingRequest($tilmeldingRequest) + ->setInvocationContext($invocationContext) + ->setAuthorityContext($authorityContext) + ->setCallContext($callContext); + } + /** + * Get TilmeldingRequest value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TilmeldingRequestType + */ + public function getTilmeldingRequest(): \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TilmeldingRequestType + { + return $this->TilmeldingRequest; + } + /** + * Set TilmeldingRequest value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TilmeldingRequestType $tilmeldingRequest + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintSpoergTilmeldingRequestType + */ + public function setTilmeldingRequest(\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TilmeldingRequestType $tilmeldingRequest): self + { + $this->TilmeldingRequest = $tilmeldingRequest; + + return $this; + } + /** + * Get InvocationContext value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType|null + */ + public function getInvocationContext(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType + { + return $this->InvocationContext; + } + /** + * Set InvocationContext value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType $invocationContext + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintSpoergTilmeldingRequestType + */ + public function setInvocationContext(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\InvocationContextType $invocationContext = null): self + { + $this->InvocationContext = $invocationContext; + + return $this; + } + /** + * Get AuthorityContext value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\AuthorityContextType|null + */ + public function getAuthorityContext(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\AuthorityContextType + { + return $this->AuthorityContext; + } + /** + * Set AuthorityContext value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\AuthorityContextType $authorityContext + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintSpoergTilmeldingRequestType + */ + public function setAuthorityContext(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\AuthorityContextType $authorityContext = null): self + { + $this->AuthorityContext = $authorityContext; + + return $this; + } + /** + * Get CallContext value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CallContextType|null + */ + public function getCallContext(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CallContextType + { + return $this->CallContext; + } + /** + * Set CallContext value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CallContextType $callContext + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintSpoergTilmeldingRequestType + */ + public function setCallContext(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\CallContextType $callContext = null): self + { + $this->CallContext = $callContext; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintSpoergTilmeldingResponseType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintSpoergTilmeldingResponseType.php new file mode 100644 index 0000000..4986360 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/PrintSpoergTilmeldingResponseType.php @@ -0,0 +1,57 @@ +setTilmeldt($tilmeldt); + } + /** + * Get tilmeldt value + * @return bool + */ + public function getTilmeldt(): bool + { + return $this->tilmeldt; + } + /** + * Set tilmeldt value + * @param bool $tilmeldt + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintSpoergTilmeldingResponseType + */ + public function setTilmeldt(bool $tilmeldt): self + { + // validation for constraint: boolean + if (!is_null($tilmeldt) && !is_bool($tilmeldt)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($tilmeldt, true), gettype($tilmeldt)), __LINE__); + } + $this->tilmeldt = $tilmeldt; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ServiceplatformFaultType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ServiceplatformFaultType.php new file mode 100644 index 0000000..5c3f929 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/ServiceplatformFaultType.php @@ -0,0 +1,53 @@ +setErrorList($errorList); + } + /** + * Get ErrorList value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorListType|null + */ + public function getErrorList(): ?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorListType + { + return $this->ErrorList; + } + /** + * Set ErrorList value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorListType $errorList + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ServiceplatformFaultType + */ + public function setErrorList(?\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\ErrorListType $errorList = null): self + { + $this->ErrorList = $errorList; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/SlutbrugerIdentitetType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/SlutbrugerIdentitetType.php new file mode 100644 index 0000000..fa49ce2 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/SlutbrugerIdentitetType.php @@ -0,0 +1,187 @@ +setCPRnummerIdentifikator($cPRnummerIdentifikator) + ->setCVRnummerIdentifikator($cVRnummerIdentifikator); + } + /** + * Get CPRnummerIdentifikator value + * @return string|null + */ + public function getCPRnummerIdentifikator(): ?string + { + return isset($this->CPRnummerIdentifikator) ? $this->CPRnummerIdentifikator : null; + } + /** + * This method is responsible for validating the value passed to the setCPRnummerIdentifikator method + * This method is willingly generated in order to preserve the one-line inline validation within the setCPRnummerIdentifikator method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateCPRnummerIdentifikatorForChoiceConstraintsFromSetCPRnummerIdentifikator($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CVRnummerIdentifikator', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property CPRnummerIdentifikator can\'t be set as the property %s is already set. Only one property must be set among these properties: CPRnummerIdentifikator, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set CPRnummerIdentifikator value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $cPRnummerIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\SlutbrugerIdentitetType + */ + public function setCPRnummerIdentifikator(?string $cPRnummerIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($cPRnummerIdentifikator) && !is_string($cPRnummerIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cPRnummerIdentifikator, true), gettype($cPRnummerIdentifikator)), __LINE__); + } + // validation for constraint: choice(CPRnummerIdentifikator, CVRnummerIdentifikator) + if ('' !== ($cPRnummerIdentifikatorChoiceErrorMessage = self::validateCPRnummerIdentifikatorForChoiceConstraintsFromSetCPRnummerIdentifikator($cPRnummerIdentifikator))) { + throw new InvalidArgumentException($cPRnummerIdentifikatorChoiceErrorMessage, __LINE__); + } + // validation for constraint: pattern(((((0[1-9]|1[0-9]|2[0-9]|3[0-1])(01|03|05|07|08|10|12))|((0[1-9]|1[0-9]|2[0-9]|30)(04|06|09|11))|((0[1-9]|1[0-9]|2[0-9])(02)))[0-9]{6})|0000000000) + if (!is_null($cPRnummerIdentifikator) && !preg_match('/((((0[1-9]|1[0-9]|2[0-9]|3[0-1])(01|03|05|07|08|10|12))|((0[1-9]|1[0-9]|2[0-9]|30)(04|06|09|11))|((0[1-9]|1[0-9]|2[0-9])(02)))[0-9]{6})|0000000000/', $cPRnummerIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /((((0[1-9]|1[0-9]|2[0-9]|3[0-1])(01|03|05|07|08|10|12))|((0[1-9]|1[0-9]|2[0-9]|30)(04|06|09|11))|((0[1-9]|1[0-9]|2[0-9])(02)))[0-9]{6})|0000000000/', var_export($cPRnummerIdentifikator, true)), __LINE__); + } + if (is_null($cPRnummerIdentifikator) || (is_array($cPRnummerIdentifikator) && empty($cPRnummerIdentifikator))) { + unset($this->CPRnummerIdentifikator); + } else { + $this->CPRnummerIdentifikator = $cPRnummerIdentifikator; + } + + return $this; + } + /** + * Get CVRnummerIdentifikator value + * @return string|null + */ + public function getCVRnummerIdentifikator(): ?string + { + return isset($this->CVRnummerIdentifikator) ? $this->CVRnummerIdentifikator : null; + } + /** + * This method is responsible for validating the value passed to the setCVRnummerIdentifikator method + * This method is willingly generated in order to preserve the one-line inline validation within the setCVRnummerIdentifikator method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateCVRnummerIdentifikatorForChoiceConstraintsFromSetCVRnummerIdentifikator($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CPRnummerIdentifikator', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property CVRnummerIdentifikator can\'t be set as the property %s is already set. Only one property must be set among these properties: CVRnummerIdentifikator, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set CVRnummerIdentifikator value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $cVRnummerIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\SlutbrugerIdentitetType + */ + public function setCVRnummerIdentifikator(?string $cVRnummerIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($cVRnummerIdentifikator) && !is_string($cVRnummerIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cVRnummerIdentifikator, true), gettype($cVRnummerIdentifikator)), __LINE__); + } + // validation for constraint: choice(CPRnummerIdentifikator, CVRnummerIdentifikator) + if ('' !== ($cVRnummerIdentifikatorChoiceErrorMessage = self::validateCVRnummerIdentifikatorForChoiceConstraintsFromSetCVRnummerIdentifikator($cVRnummerIdentifikator))) { + throw new InvalidArgumentException($cVRnummerIdentifikatorChoiceErrorMessage, __LINE__); + } + // validation for constraint: length(8) + if (!is_null($cVRnummerIdentifikator) && mb_strlen((string) $cVRnummerIdentifikator) !== 8) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be equal to 8', mb_strlen((string) $cVRnummerIdentifikator)), __LINE__); + } + if (is_null($cVRnummerIdentifikator) || (is_array($cVRnummerIdentifikator) && empty($cVRnummerIdentifikator))) { + unset($this->CVRnummerIdentifikator); + } else { + $this->CVRnummerIdentifikator = $cVRnummerIdentifikator; + } + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/TilmeldingRequestType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/TilmeldingRequestType.php new file mode 100644 index 0000000..821756a --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/TilmeldingRequestType.php @@ -0,0 +1,88 @@ +setSlutbrugerIdentitet($slutbrugerIdentitet) + ->setMeddelelseIndholdstypeIdentifikator($meddelelseIndholdstypeIdentifikator); + } + /** + * Get SlutbrugerIdentitet value + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\SlutbrugerIdentitetType + */ + public function getSlutbrugerIdentitet(): \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\SlutbrugerIdentitetType + { + return $this->SlutbrugerIdentitet; + } + /** + * Set SlutbrugerIdentitet value + * @param \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\SlutbrugerIdentitetType $slutbrugerIdentitet + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TilmeldingRequestType + */ + public function setSlutbrugerIdentitet(\ItkDev\OS2Forms_Digital_Post\PrintService\StructType\SlutbrugerIdentitetType $slutbrugerIdentitet): self + { + $this->SlutbrugerIdentitet = $slutbrugerIdentitet; + + return $this; + } + /** + * Get MeddelelseIndholdstypeIdentifikator value + * @return int|null + */ + public function getMeddelelseIndholdstypeIdentifikator(): ?int + { + return $this->MeddelelseIndholdstypeIdentifikator; + } + /** + * Set MeddelelseIndholdstypeIdentifikator value + * @param int $meddelelseIndholdstypeIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TilmeldingRequestType + */ + public function setMeddelelseIndholdstypeIdentifikator(?int $meddelelseIndholdstypeIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($meddelelseIndholdstypeIdentifikator) && !(is_int($meddelelseIndholdstypeIdentifikator) || ctype_digit($meddelelseIndholdstypeIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($meddelelseIndholdstypeIdentifikator, true), gettype($meddelelseIndholdstypeIdentifikator)), __LINE__); + } + $this->MeddelelseIndholdstypeIdentifikator = $meddelelseIndholdstypeIdentifikator; + + return $this; + } +} diff --git a/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/TransaktionsParametreIType.php b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/TransaktionsParametreIType.php new file mode 100644 index 0000000..2b635d9 --- /dev/null +++ b/generated-sources/PrintService/ItkDev/OS2Forms_Digital_Post/PrintService/StructType/TransaktionsParametreIType.php @@ -0,0 +1,183 @@ +\(\)\[\]\\,;:@\s]{0,191}@[^>\(\)\[\]\\,;:@\s]{1,64}) + * - ref: fjernprint:KvitteringsEmail + * @var string|null + */ + protected ?string $KvitteringsEmail = null; + /** + * Constructor method for TransaktionsParametreIType + * @uses TransaktionsParametreIType::setTransaktionsDatoTid() + * @uses TransaktionsParametreIType::setMasseForsendelseIdentifikator() + * @uses TransaktionsParametreIType::setKvitteringsTypeKode() + * @uses TransaktionsParametreIType::setKvitteringsEmail() + * @param string $transaktionsDatoTid + * @param string $masseForsendelseIdentifikator + * @param string $kvitteringsTypeKode + * @param string $kvitteringsEmail + */ + public function __construct(?string $transaktionsDatoTid = null, ?string $masseForsendelseIdentifikator = null, ?string $kvitteringsTypeKode = null, ?string $kvitteringsEmail = null) + { + $this + ->setTransaktionsDatoTid($transaktionsDatoTid) + ->setMasseForsendelseIdentifikator($masseForsendelseIdentifikator) + ->setKvitteringsTypeKode($kvitteringsTypeKode) + ->setKvitteringsEmail($kvitteringsEmail); + } + /** + * Get TransaktionsDatoTid value + * @return string|null + */ + public function getTransaktionsDatoTid(): ?string + { + return $this->TransaktionsDatoTid; + } + /** + * Set TransaktionsDatoTid value + * @param string $transaktionsDatoTid + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TransaktionsParametreIType + */ + public function setTransaktionsDatoTid(?string $transaktionsDatoTid = null): self + { + // validation for constraint: string + if (!is_null($transaktionsDatoTid) && !is_string($transaktionsDatoTid)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($transaktionsDatoTid, true), gettype($transaktionsDatoTid)), __LINE__); + } + $this->TransaktionsDatoTid = $transaktionsDatoTid; + + return $this; + } + /** + * Get MasseForsendelseIdentifikator value + * @return string|null + */ + public function getMasseForsendelseIdentifikator(): ?string + { + return $this->MasseForsendelseIdentifikator; + } + /** + * Set MasseForsendelseIdentifikator value + * @param string $masseForsendelseIdentifikator + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TransaktionsParametreIType + */ + public function setMasseForsendelseIdentifikator(?string $masseForsendelseIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($masseForsendelseIdentifikator) && !is_string($masseForsendelseIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($masseForsendelseIdentifikator, true), gettype($masseForsendelseIdentifikator)), __LINE__); + } + // validation for constraint: maxLength(38) + if (!is_null($masseForsendelseIdentifikator) && mb_strlen((string) $masseForsendelseIdentifikator) > 38) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 38', mb_strlen((string) $masseForsendelseIdentifikator)), __LINE__); + } + // validation for constraint: minLength(1) + if (!is_null($masseForsendelseIdentifikator) && mb_strlen((string) $masseForsendelseIdentifikator) < 1) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be greater than or equal to 1', mb_strlen((string) $masseForsendelseIdentifikator)), __LINE__); + } + $this->MasseForsendelseIdentifikator = $masseForsendelseIdentifikator; + + return $this; + } + /** + * Get KvitteringsTypeKode value + * @return string|null + */ + public function getKvitteringsTypeKode(): ?string + { + return $this->KvitteringsTypeKode; + } + /** + * Set KvitteringsTypeKode value + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KvitteringsTypeKodeType::valueIsValid() + * @uses \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KvitteringsTypeKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $kvitteringsTypeKode + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TransaktionsParametreIType + */ + public function setKvitteringsTypeKode(?string $kvitteringsTypeKode = null): self + { + // validation for constraint: enumeration + if (!\ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KvitteringsTypeKodeType::valueIsValid($kvitteringsTypeKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KvitteringsTypeKodeType', is_array($kvitteringsTypeKode) ? implode(', ', $kvitteringsTypeKode) : var_export($kvitteringsTypeKode, true), implode(', ', \ItkDev\OS2Forms_Digital_Post\PrintService\EnumType\KvitteringsTypeKodeType::getValidValues())), __LINE__); + } + $this->KvitteringsTypeKode = $kvitteringsTypeKode; + + return $this; + } + /** + * Get KvitteringsEmail value + * @return string|null + */ + public function getKvitteringsEmail(): ?string + { + return $this->KvitteringsEmail; + } + /** + * Set KvitteringsEmail value + * @param string $kvitteringsEmail + * @return \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\TransaktionsParametreIType + */ + public function setKvitteringsEmail(?string $kvitteringsEmail = null): self + { + // validation for constraint: string + if (!is_null($kvitteringsEmail) && !is_string($kvitteringsEmail)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($kvitteringsEmail, true), gettype($kvitteringsEmail)), __LINE__); + } + // validation for constraint: pattern(([^>\(\)\[\]\\,;:@\s]{0,191}@[^>\(\)\[\]\\,;:@\s]{1,64})) + if (!is_null($kvitteringsEmail) && !preg_match('/([^>\\(\\)\\[\\]\\\\,;:@\\s]{0,191}@[^>\\(\\)\\[\\]\\\\,;:@\\s]{1,64})/', $kvitteringsEmail)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /([^>\\(\\)\\[\\]\\\\,;:@\\s]{0,191}@[^>\\(\\)\\[\\]\\\\,;:@\\s]{1,64})/', var_export($kvitteringsEmail, true)), __LINE__); + } + $this->KvitteringsEmail = $kvitteringsEmail; + + return $this; + } +} diff --git a/generated-sources/PrintService/tutorial.php b/generated-sources/PrintService/tutorial.php new file mode 100644 index 0000000..0322841 --- /dev/null +++ b/generated-sources/PrintService/tutorial.php @@ -0,0 +1,49 @@ + '../resources/contracts/PrintService/wsdl/context/PrintService.wsdl', + * WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_TRACE => true, + * WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_LOGIN => 'you_secret_login', + * WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_PASSWORD => 'you_secret_password', + * ]; + * etc... + * ################################################################################ + * Don't forget to add wsdltophp/packagebase:~5.0 to your main composer.json. + * ################################################################################ + */ +/** + * Minimal options + */ +$options = [ + WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => '../resources/contracts/PrintService/wsdl/context/PrintService.wsdl', + WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => \ItkDev\OS2Forms_Digital_Post\PrintService\ClassMap::get(), +]; +/** + * Samples for Afsend ServiceType + */ +$afsend = new \ItkDev\OS2Forms_Digital_Post\PrintService\ServiceType\Afsend($options); +/** + * Sample call for afsendBrev operation/method + */ +if ($afsend->afsendBrev(new \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintAfsendBrevRequestType()) !== false) { + print_r($afsend->getResult()); +} else { + print_r($afsend->getLastError()); +} +/** + * Samples for Spoerg ServiceType + */ +$spoerg = new \ItkDev\OS2Forms_Digital_Post\PrintService\ServiceType\Spoerg($options); +/** + * Sample call for spoergTilmelding operation/method + */ +if ($spoerg->spoergTilmelding(new \ItkDev\OS2Forms_Digital_Post\PrintService\StructType\PrintSpoergTilmeldingRequestType()) !== false) { + print_r($spoerg->getResult()); +} else { + print_r($spoerg->getLastError()); +} diff --git a/os2forms_digital_post.services.yml b/os2forms_digital_post.services.yml index d434907..017d265 100644 --- a/os2forms_digital_post.services.yml +++ b/os2forms_digital_post.services.yml @@ -2,3 +2,7 @@ services: os2forms_digital_post.template_manager: class: Drupal\os2forms_digital_post\Manager\TemplateManager arguments: ["@config.factory", "@twig", "@twig.loader.filesystem"] + + os2forms_digital_post.print_service_consumer: + class: Drupal\os2forms_digital_post\Consumer\PrintServiceConsumer + arguments: ["@config.factory", "@http_client", "@lock", "@state", "@uuid"] diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 0000000..afd36d2 --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,21 @@ + + + The coding standard. + + . + vendor/ + + + + + + + + + + + + + + + diff --git a/resources/contracts/PrintService/PrintServiceMsg.xsd b/resources/contracts/PrintService/PrintServiceMsg.xsd new file mode 100644 index 0000000..4f6e44e --- /dev/null +++ b/resources/contracts/PrintService/PrintServiceMsg.xsd @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Aa.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Aa.xsd new file mode 100644 index 0000000..3115b62 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Aa.xsd @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Afsendelse.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Afsendelse.xsd new file mode 100644 index 0000000..1ff8d70 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Afsendelse.xsd @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseDatoTid.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseDatoTid.xsd new file mode 100644 index 0000000..760818b --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseDatoTid.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseIdentifikator.xsd new file mode 100644 index 0000000..daf2eb8 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseIdentifikator.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseModtager.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseModtager.xsd new file mode 100644 index 0000000..84e8dc8 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseModtager.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseTilstandNavn.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseTilstandNavn.xsd new file mode 100644 index 0000000..1ee149e --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseTilstandNavn.xsd @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseURLreference.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseURLreference.xsd new file mode 100644 index 0000000..f5069f9 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsendelseURLreference.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsenderAdresse.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsenderAdresse.xsd new file mode 100644 index 0000000..c5b1958 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsenderAdresse.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsenderSystemIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsenderSystemIdentifikator.xsd new file mode 100644 index 0000000..6bbbae4 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AfsenderSystemIdentifikator.xsd @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AllokeringsIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AllokeringsIdentifikator.xsd new file mode 100644 index 0000000..098aaaf --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/AllokeringsIdentifikator.xsd @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Bilag.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Bilag.xsd new file mode 100644 index 0000000..69b3efa --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Bilag.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagIdentifikator.xsd new file mode 100644 index 0000000..6003f9a --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagIdentifikator.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagNavn.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagNavn.xsd new file mode 100644 index 0000000..8b32854 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagNavn.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagSamling.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagSamling.xsd new file mode 100644 index 0000000..d165c78 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagSamling.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagSorteringsIndeksIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagSorteringsIndeksIdentifikator.xsd new file mode 100644 index 0000000..fef870d --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BilagSorteringsIndeksIdentifikator.xsd @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BrevDato.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BrevDato.xsd new file mode 100644 index 0000000..9199770 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BrevDato.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BrugerNavn.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BrugerNavn.xsd new file mode 100644 index 0000000..fb532f7 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/BrugerNavn.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPR_CompletePostalLabelText.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPR_CompletePostalLabelText.xsd new file mode 100644 index 0000000..cf9bdde --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPR_CompletePostalLabelText.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPR_PersonCivilRegistrationIdentifier.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPR_PersonCivilRegistrationIdentifier.xsd new file mode 100644 index 0000000..c56fe94 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPR_PersonCivilRegistrationIdentifier.xsd @@ -0,0 +1,40 @@ + + + + + CivilRegistrationNumber (PNR) + + Description: + Unique identification of a person + + The Civil Registration System contains: + - Data on persons, who after 1968 April 2nd Danish registry of citizens. + As for Greenland the corresponding date is 1972 may 1st. + - Danish citizens living outside Denmark (who must pay duty and ATP) + has also been given a civil registration number. + - Civil registration numbers are also assigned for other administrative purposes. + + + Value space: + The civil registration number consists of two parts. + The first part is the valid birthday in the form DDMMYY. + The following part is a serial number of four digits. + The civil registration number may also hold the value 0000000000. + This value is used where the civil registration number is required but unknown. + + Lifecycle: + The civil registration number is generated and assigned at birth, entry and change of civil registration number of for administrative reasons. + The civil registration number may be assigned via hospitals. + + The civil registration number is not to be deleted. + + Remarks: + 1994 June 11th the civil registration number was changed according to this description. + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPRnummerIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPRnummerIdentifikator.xsd new file mode 100644 index 0000000..d7e135f --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CPRnummerIdentifikator.xsd @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CVR_CVRnumberIdentifier.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CVR_CVRnumberIdentifier.xsd new file mode 100644 index 0000000..d6b533c --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CVR_CVRnumberIdentifier.xsd @@ -0,0 +1,13 @@ + + + + + Unique and generally usable identifier for all legal units included i CVR. + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CVRnummerIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CVRnummerIdentifikator.xsd new file mode 100644 index 0000000..67d3c78 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CVRnummerIdentifikator.xsd @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CallContext.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CallContext.xsd new file mode 100644 index 0000000..61493dc --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CallContext.xsd @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CoNavn.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CoNavn.xsd new file mode 100644 index 0000000..6c638f4 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/CoNavn.xsd @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_CountryIdentificationCode.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_CountryIdentificationCode.xsd new file mode 100644 index 0000000..6146a36 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_CountryIdentificationCode.xsd @@ -0,0 +1,56 @@ + + + + + + The country code based on the 4 diffent schemes. + Landeidentifikations kode baseret på de 4 forskellige formater. + + + + + + + + + + This is a support type for CountryIdentificationCodeType. The pattern is a choice of 4 different patterns for different schems. ISO 3166 standard, alpha 2: [a-z,A-Z]{2}. Eksample "DK" for Danmark. ISO 3166 standard, alpha 3: [a-z,A-Z]{3}. Eksample "DKN" for Danmark. UN Statistics Divisions country codes: [0-9]{3}. Eksample "208" for Danmark AuthorityCode from the Central Office of Civil Registration: [0-9]{4}. Eksample "5100" for Danmark. + Dette er en støttetype til CountryIdentificationCodeType. Det regulære udtryk er et valg for de 4 forskellige regulære udtryk for de forskellige formater. ISO 3166 standard, alpha 2: [a-z,A-Z]{2}. Eksempel "DK" for Danmark. ISO 3166 standard, alpha 3: [a-z,A-Z]{3}. Eksempel "DKN" for Danmark. UN Statistics Divisions country codes: [0-9]{3}. Eksempel "208" for Danmark AuthorityCode from the Central Office of Civil Registration: [0-9]{4}. Eksempel "5100" for Danmark. + + + + + + + + This is a support type for CountryIdentificationCodeType. + Dette er en støttetype til CountryIdentificationCodeType. + + + + + This scheme follows the ISO 3166 standard, alpha 2. + Dette format følge ISO 3166 standarden, alpha 2. + + + + + This scheme follows the ISO 3166 standard, alpha 3. + Dette format følge ISO 3166 standarden, alpha 3. + + + + + This scheme follows the UN Statistics Divisions country codes. + Dette format følger FNs Statistik Kontor landekoder + + + + + This scheme follows the AuthorityCode from the Central Office of Civil Registration. + Dette format følger MyndighedsKoden fra Det Centrale Personregister + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_DistrictName.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_DistrictName.xsd new file mode 100644 index 0000000..1a1ae08 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_DistrictName.xsd @@ -0,0 +1,19 @@ + + + + + Declares the name of a postal district in plain text. +The field contains 20 positions, which enables it to fit a window envelope +together with the postal code and one free position in addition. The postal +district is defined by municipalitycode, roadcode, postalcode, housenumber +from/to together with a code, which declares whether the roadsection in +question contains even or uneven housenumbers. + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_DistrictSubdivisionIdentifier.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_DistrictSubdivisionIdentifier.xsd new file mode 100644 index 0000000..e87c720 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_DistrictSubdivisionIdentifier.xsd @@ -0,0 +1,14 @@ + + + + + Name of a village, city or subdivision of a city or district, which is determined as a part of the official address specification for a certain street or specific parts of a street, defined by intervals of street building identifiers (da: house numbers). + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_FloorIdentifier.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_FloorIdentifier.xsd new file mode 100644 index 0000000..c213bcf --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_FloorIdentifier.xsd @@ -0,0 +1,13 @@ + + + + + Identification which describes the floor or level on which a specific entrance door, appartment or suite is placed, in the staircase refered to. + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_MailDeliverySublocationIdentifier.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_MailDeliverySublocationIdentifier.xsd new file mode 100644 index 0000000..5a280d5 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_MailDeliverySublocationIdentifier.xsd @@ -0,0 +1,14 @@ + + + + + The given name of a farm, estate, building or dwelling, which is used as a additional postal address identifier. + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostCodeIdentifier.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostCodeIdentifier.xsd new file mode 100644 index 0000000..ffe1bfe --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostCodeIdentifier.xsd @@ -0,0 +1,13 @@ + + + + + The postal departments nationwide postal code. + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostOfficeBoxIdentifier.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostOfficeBoxIdentifier.xsd new file mode 100644 index 0000000..82a0d2f --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostOfficeBoxIdentifier.xsd @@ -0,0 +1,17 @@ + + + + + Declaration of a Post Office Box. + + + + + Declaration of a Post Office Box. + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFifthLineText.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFifthLineText.xsd new file mode 100644 index 0000000..2ba8710 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFifthLineText.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFirstLineText.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFirstLineText.xsd new file mode 100644 index 0000000..39937ff --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFirstLineText.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFourthLineText.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFourthLineText.xsd new file mode 100644 index 0000000..05b0c2c --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressFourthLineText.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressSecondLineText.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressSecondLineText.xsd new file mode 100644 index 0000000..9723f12 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressSecondLineText.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressSixthLineText.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressSixthLineText.xsd new file mode 100644 index 0000000..d5d9239 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressSixthLineText.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressThirdLineText.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressThirdLineText.xsd new file mode 100644 index 0000000..c0fe822 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_PostalAddressThirdLineText.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_StreetBuildingIdentifier.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_StreetBuildingIdentifier.xsd new file mode 100644 index 0000000..f8607e1 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_StreetBuildingIdentifier.xsd @@ -0,0 +1,13 @@ + + + + + Numeric identification (da: house number ~ 'husnummer') including an optional letter, which identifies a certain access to a building, a plot/piece of land or a plant etc. based on the named road or street which gives access hereto. The identifier is determined in increasing numerical and letter order along the road, normally with even numbers on the right side and odd numbers on the left side of the road. + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_StreetName.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_StreetName.xsd new file mode 100644 index 0000000..6a63ded --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_StreetName.xsd @@ -0,0 +1,14 @@ + + + + + The approved name of a road, a street, a square, a path and the like. Further more street names can be connected to other particularly limited areas like garden associations or summer residence areas without road network, large commercial or institutional areas with a large number of buildings, smaller islands without road network, larger sporting facilities and the like. + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_SuiteIdentifier.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_SuiteIdentifier.xsd new file mode 100644 index 0000000..ec855c4 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DKCC_SuiteIdentifier.xsd @@ -0,0 +1,14 @@ + + + + + Identification which describes the location of a specific entrance door on a floor or level (repos) in the staircase referred to. + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DigitalPostParametre.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DigitalPostParametre.xsd new file mode 100644 index 0000000..4df675c --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DigitalPostParametre.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DokumentParametre.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DokumentParametre.xsd new file mode 100644 index 0000000..1f48fad --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/DokumentParametre.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/EnhedTekst.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/EnhedTekst.xsd new file mode 100644 index 0000000..f9865b6 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/EnhedTekst.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDaktoerIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDaktoerIdentifikator.xsd new file mode 100644 index 0000000..f67ac96 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDaktoerIdentifikator.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDdokumentIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDdokumentIdentifikator.xsd new file mode 100644 index 0000000..74dfb34 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDdokumentIdentifikator.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDsagIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDsagIdentifikator.xsd new file mode 100644 index 0000000..5781768 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDsagIdentifikator.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDsagsklassifikationIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDsagsklassifikationIdentifikator.xsd new file mode 100644 index 0000000..3817417 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FESDsagsklassifikationIdentifikator.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FarveSHKode.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FarveSHKode.xsd new file mode 100644 index 0000000..451bddf --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FarveSHKode.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Fejl.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Fejl.xsd new file mode 100644 index 0000000..99edbad --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Fejl.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlIdentifikator.xsd new file mode 100644 index 0000000..88c329f --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlIdentifikator.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlKode.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlKode.xsd new file mode 100644 index 0000000..79abc1f --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlKode.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlTekst.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlTekst.xsd new file mode 100644 index 0000000..e795363 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlTekst.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlbeskedTekst.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlbeskedTekst.xsd new file mode 100644 index 0000000..c39d3d8 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FejlbeskedTekst.xsd @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FilformatNavn.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FilformatNavn.xsd new file mode 100644 index 0000000..a32fe34 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/FilformatNavn.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseAfsender.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseAfsender.xsd new file mode 100644 index 0000000..dd50c7e --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseAfsender.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseI.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseI.xsd new file mode 100644 index 0000000..639ee6a --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseI.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseModtager.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseModtager.xsd new file mode 100644 index 0000000..cf739d1 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseModtager.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseStatus.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseStatus.xsd new file mode 100644 index 0000000..3f7f642 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseStatus.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseTypeIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseTypeIdentifikator.xsd new file mode 100644 index 0000000..e24231b --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ForsendelseTypeIdentifikator.xsd @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/HasteBrevIndikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/HasteBrevIndikator.xsd new file mode 100644 index 0000000..cb1b071 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/HasteBrevIndikator.xsd @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ITST_PersonName.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ITST_PersonName.xsd new file mode 100644 index 0000000..1bee36c --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ITST_PersonName.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/IndholdStoerrelseMaal.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/IndholdStoerrelseMaal.xsd new file mode 100644 index 0000000..44af303 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/IndholdStoerrelseMaal.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/InformationVedAdresseAendringIndikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/InformationVedAdresseAendringIndikator.xsd new file mode 100644 index 0000000..365ca6c --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/InformationVedAdresseAendringIndikator.xsd @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KanalKode.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KanalKode.xsd new file mode 100644 index 0000000..0643641 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KanalKode.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KanalUafhaengigeParametreI.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KanalUafhaengigeParametreI.xsd new file mode 100644 index 0000000..e46ec5a --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KanalUafhaengigeParametreI.xsd @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KontaktOplysning.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KontaktOplysning.xsd new file mode 100644 index 0000000..e477af1 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KontaktOplysning.xsd @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KonteringsGruppeTekst.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KonteringsGruppeTekst.xsd new file mode 100644 index 0000000..a4196a0 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KonteringsGruppeTekst.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KuvertTypeKode.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KuvertTypeKode.xsd new file mode 100644 index 0000000..9f51c02 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KuvertTypeKode.xsd @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Kvittering.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Kvittering.xsd new file mode 100644 index 0000000..a77dd17 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Kvittering.xsd @@ -0,0 +1,53 @@ + + + + Version 1.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KvitteringsEmail.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KvitteringsEmail.xsd new file mode 100644 index 0000000..b1fd135 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KvitteringsEmail.xsd @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KvitteringsTypeKode.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KvitteringsTypeKode.xsd new file mode 100644 index 0000000..a346b70 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/KvitteringsTypeKode.xsd @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MIMEcontentIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MIMEcontentIdentifikator.xsd new file mode 100644 index 0000000..46a96e8 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MIMEcontentIdentifikator.xsd @@ -0,0 +1,5 @@ + + + + diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MasseForsendelseIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MasseForsendelseIdentifikator.xsd new file mode 100644 index 0000000..9753a34 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MasseForsendelseIdentifikator.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseAfsenderNavn.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseAfsenderNavn.xsd new file mode 100644 index 0000000..b4046ec --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseAfsenderNavn.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseFESDmetadata.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseFESDmetadata.xsd new file mode 100644 index 0000000..918217e --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseFESDmetadata.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIdentifikator.xsd new file mode 100644 index 0000000..e12203b --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIdentifikator.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdData.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdData.xsd new file mode 100644 index 0000000..264edb2 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdData.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdURLreference.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdURLreference.xsd new file mode 100644 index 0000000..fae04c0 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdURLreference.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdstypeIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdstypeIdentifikator.xsd new file mode 100644 index 0000000..dac3b41 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseIndholdstypeIdentifikator.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseServicebeskedTekst.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseServicebeskedTekst.xsd new file mode 100644 index 0000000..664fa0f --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseServicebeskedTekst.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarEmneIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarEmneIdentifikator.xsd new file mode 100644 index 0000000..c3195cf --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarEmneIdentifikator.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarPostkasseIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarPostkasseIdentifikator.xsd new file mode 100644 index 0000000..21e19a1 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarPostkasseIdentifikator.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarTypeNavn.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarTypeNavn.xsd new file mode 100644 index 0000000..7515e22 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseSvarTypeNavn.xsd @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTidsfristDato.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTidsfristDato.xsd new file mode 100644 index 0000000..cf04cbd --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTidsfristDato.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTidsfristTekst.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTidsfristTekst.xsd new file mode 100644 index 0000000..7ef1b99 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTidsfristTekst.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTitelTekst.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTitelTekst.xsd new file mode 100644 index 0000000..f2462bb --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTitelTekst.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTraadIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTraadIdentifikator.xsd new file mode 100644 index 0000000..504709c --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTraadIdentifikator.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTypeNavn.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTypeNavn.xsd new file mode 100644 index 0000000..9991489 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelseTypeNavn.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelsesFormatObjekt.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelsesFormatObjekt.xsd new file mode 100644 index 0000000..433146f --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MeddelelsesFormatObjekt.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MedsendDokumentRegistreringIndikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MedsendDokumentRegistreringIndikator.xsd new file mode 100644 index 0000000..e0903f1 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/MedsendDokumentRegistreringIndikator.xsd @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ModtagerAdresse.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ModtagerAdresse.xsd new file mode 100644 index 0000000..71eb436 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ModtagerAdresse.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykAfsenderAdresseIndikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykAfsenderAdresseIndikator.xsd new file mode 100644 index 0000000..ef544f2 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykAfsenderAdresseIndikator.xsd @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykBrevdatoIndikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykBrevdatoIndikator.xsd new file mode 100644 index 0000000..e681b30 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykBrevdatoIndikator.xsd @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykModtagerAdresseIndikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykModtagerAdresseIndikator.xsd new file mode 100644 index 0000000..38c55e4 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PaatrykModtagerAdresseIndikator.xsd @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PostKategoriKode.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PostKategoriKode.xsd new file mode 100644 index 0000000..1d5f29f --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PostKategoriKode.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PostParametre.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PostParametre.xsd new file mode 100644 index 0000000..225e971 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PostParametre.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PrintParametre.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PrintParametre.xsd new file mode 100644 index 0000000..f0c0699 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/PrintParametre.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ReturposthaandteringHosLeverandoerIndikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ReturposthaandteringHosLeverandoerIndikator.xsd new file mode 100644 index 0000000..954410f --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/ReturposthaandteringHosLeverandoerIndikator.xsd @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SideKvantitet.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SideKvantitet.xsd new file mode 100644 index 0000000..e3bfea2 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SideKvantitet.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SimplexDuplexKode.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SimplexDuplexKode.xsd new file mode 100644 index 0000000..7688967 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SimplexDuplexKode.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SlutbrugerIdentitet.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SlutbrugerIdentitet.xsd new file mode 100644 index 0000000..5794f61 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/SlutbrugerIdentitet.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/StandardRetur.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/StandardRetur.xsd new file mode 100644 index 0000000..df3d76b --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/StandardRetur.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/StatusKode.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/StatusKode.xsd new file mode 100644 index 0000000..9e98eb2 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/StatusKode.xsd @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldFejlKode.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldFejlKode.xsd new file mode 100644 index 0000000..0aaab85 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldFejlKode.xsd @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldFejlTekst.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldFejlTekst.xsd new file mode 100644 index 0000000..adee2da --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldFejlTekst.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldStatus.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldStatus.xsd new file mode 100644 index 0000000..22d1c66 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldStatus.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldStatusKode.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldStatusKode.xsd new file mode 100644 index 0000000..484df94 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TilbagekaldStatusKode.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TitelTekst.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TitelTekst.xsd new file mode 100644 index 0000000..a906473 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TitelTekst.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TransaktionsDatoTid.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TransaktionsDatoTid.xsd new file mode 100644 index 0000000..b011f8c --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TransaktionsDatoTid.xsd @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TransaktionsParametreI.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TransaktionsParametreI.xsd new file mode 100644 index 0000000..deb48a1 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/TransaktionsParametreI.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/UUID.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/UUID.xsd new file mode 100644 index 0000000..6b95f9e --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/UUID.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/UUIDIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/UUIDIdentifikator.xsd new file mode 100644 index 0000000..dc06dc4 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/UUIDIdentifikator.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftSomIndholdDataIndikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftSomIndholdDataIndikator.xsd new file mode 100644 index 0000000..f5d2566 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftSomIndholdDataIndikator.xsd @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Vedhaeftning.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Vedhaeftning.xsd new file mode 100644 index 0000000..0be9aa2 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/Vedhaeftning.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdData.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdData.xsd new file mode 100644 index 0000000..9ab26e7 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdData.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdIdentifikator.xsd new file mode 100644 index 0000000..6e1c3f7 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdIdentifikator.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdURLreference.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdURLreference.xsd new file mode 100644 index 0000000..94deb75 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningIndholdURLreference.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningNavn.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningNavn.xsd new file mode 100644 index 0000000..1e72e6b --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningNavn.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligAfsenderCVRnummerIdentifikator.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligAfsenderCVRnummerIdentifikator.xsd new file mode 100644 index 0000000..cb5d3fc --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligAfsenderCVRnummerIdentifikator.xsd @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligAfsenderNavn.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligAfsenderNavn.xsd new file mode 100644 index 0000000..e3fe561 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligAfsenderNavn.xsd @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligModtagetDatoTid.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligModtagetDatoTid.xsd new file mode 100644 index 0000000..476cc07 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningOprindeligModtagetDatoTid.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningSamling.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningSamling.xsd new file mode 100644 index 0000000..03b77ad --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningSamling.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningSamlingKvantitet.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningSamlingKvantitet.xsd new file mode 100644 index 0000000..ab87562 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/VedhaeftningSamlingKvantitet.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/XKOM_EmailAddressIdentifier.xsd b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/XKOM_EmailAddressIdentifier.xsd new file mode 100644 index 0000000..08257c5 --- /dev/null +++ b/resources/contracts/PrintService/SF1600_EP_SP1-2/xsd/oio/XKOM_EmailAddressIdentifier.xsd @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/sp/AuthorityContext_1.xsd b/resources/contracts/PrintService/sp/AuthorityContext_1.xsd new file mode 100644 index 0000000..964e341 --- /dev/null +++ b/resources/contracts/PrintService/sp/AuthorityContext_1.xsd @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/sp/CallContext_1.xsd b/resources/contracts/PrintService/sp/CallContext_1.xsd new file mode 100644 index 0000000..263b291 --- /dev/null +++ b/resources/contracts/PrintService/sp/CallContext_1.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/contracts/PrintService/sp/InvocationContext_1.xsd b/resources/contracts/PrintService/sp/InvocationContext_1.xsd new file mode 100644 index 0000000..8793b46 --- /dev/null +++ b/resources/contracts/PrintService/sp/InvocationContext_1.xsd @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/sp/ServiceplatformFaultMessage_1.wsdl b/resources/contracts/PrintService/sp/ServiceplatformFaultMessage_1.wsdl new file mode 100644 index 0000000..0adde52 --- /dev/null +++ b/resources/contracts/PrintService/sp/ServiceplatformFaultMessage_1.wsdl @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/resources/contracts/PrintService/sp/ServiceplatformFault_1.xsd b/resources/contracts/PrintService/sp/ServiceplatformFault_1.xsd new file mode 100644 index 0000000..ad5420e --- /dev/null +++ b/resources/contracts/PrintService/sp/ServiceplatformFault_1.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/sp/service.properties b/resources/contracts/PrintService/sp/service.properties new file mode 100644 index 0000000..2aa25f5 --- /dev/null +++ b/resources/contracts/PrintService/sp/service.properties @@ -0,0 +1,2 @@ +service.uuid=fd885b8b-4a3f-46cb-b367-6c9dda1c78f6 +service.entityID=http://print.serviceplatformen.dk/service/forsendelse/2 \ No newline at end of file diff --git a/resources/contracts/PrintService/wsdl/context/PrintService.wsdl b/resources/contracts/PrintService/wsdl/context/PrintService.wsdl new file mode 100644 index 0000000..736dda6 --- /dev/null +++ b/resources/contracts/PrintService/wsdl/context/PrintService.wsdl @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/contracts/PrintService/wsdl/context/policies.wsdl b/resources/contracts/PrintService/wsdl/context/policies.wsdl new file mode 100644 index 0000000..3a3ba98 --- /dev/null +++ b/resources/contracts/PrintService/wsdl/context/policies.wsdl @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/wsdl/token/PrintService.wsdl b/resources/contracts/PrintService/wsdl/token/PrintService.wsdl new file mode 100644 index 0000000..736dda6 --- /dev/null +++ b/resources/contracts/PrintService/wsdl/token/PrintService.wsdl @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/contracts/PrintService/wsdl/token/policies.wsdl b/resources/contracts/PrintService/wsdl/token/policies.wsdl new file mode 100644 index 0000000..655cbd7 --- /dev/null +++ b/resources/contracts/PrintService/wsdl/token/policies.wsdl @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/contracts/PrintService/xsd/PrintServiceRequestTypes.xsd b/resources/contracts/PrintService/xsd/PrintServiceRequestTypes.xsd new file mode 100644 index 0000000..a8bfe7d --- /dev/null +++ b/resources/contracts/PrintService/xsd/PrintServiceRequestTypes.xsd @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Client/ClassMap.php b/src/Client/ClassMap.php new file mode 100644 index 0000000..6dccc70 --- /dev/null +++ b/src/Client/ClassMap.php @@ -0,0 +1,51 @@ + '\\Drupal\\os2forms_digital_post\\Client\\StructType\\InvocationContextType', + 'AuthorityContextType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\AuthorityContextType', + 'CallContextType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\CallContextType', + 'MeddelelsesFormatObjektType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\MeddelelsesFormatObjektType', + 'DokumentParametreType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\DokumentParametreType', + 'CountryIdentificationCodeType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\CountryIdentificationCodeType', + 'KontaktOplysningType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\KontaktOplysningType', + 'ForsendelseAfsenderType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\ForsendelseAfsenderType', + 'KanalUafhaengigeParametreIType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\KanalUafhaengigeParametreIType', + 'MeddelelseFESDmetadataType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\MeddelelseFESDmetadataType', + 'DigitalPostParametreType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\DigitalPostParametreType', + 'PostParametreType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\PostParametreType', + 'TransaktionsParametreIType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\TransaktionsParametreIType', + 'PrintParametreType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\PrintParametreType', + 'SlutbrugerIdentitetType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\SlutbrugerIdentitetType', + 'ForsendelseModtagerType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\ForsendelseModtagerType', + 'BilagType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\BilagType', + 'BilagSamlingType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\BilagSamlingType', + 'ForsendelseIType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\ForsendelseIType', + 'BrevSPBodyType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\BrevSPBodyType', + 'TilmeldingRequestType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\TilmeldingRequestType', + 'PrintAfsendBrevRequestType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\PrintAfsendBrevRequestType', + 'PrintAfsendBrevResponseType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\PrintAfsendBrevResponseType', + 'PrintSpoergTilmeldingRequestType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\PrintSpoergTilmeldingRequestType', + 'PrintSpoergTilmeldingResponseType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\PrintSpoergTilmeldingResponseType', + 'FejlType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\FejlType', + 'ServiceplatformFaultType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\ServiceplatformFaultType', + 'ErrorListType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\ErrorListType', + 'ErrorType' => '\\Drupal\\os2forms_digital_post\\Client\\StructType\\ErrorType', + ]; + } +} diff --git a/src/Client/EnumType/FarveSHKodeType.php b/src/Client/EnumType/FarveSHKodeType.php new file mode 100644 index 0000000..6e2eba5 --- /dev/null +++ b/src/Client/EnumType/FarveSHKodeType.php @@ -0,0 +1,38 @@ +setResult($resultAfsendBrev = $this->getSoapClient()->__soapCall('afsendBrev', [ + $request, + ], [], [], $this->outputHeaders)); + + return $resultAfsendBrev; + } catch (SoapFault $soapFault) { + $this->saveLastError(__METHOD__, $soapFault); + + return false; + } + } + /** + * Returns the result + * @see AbstractSoapClientBase::getResult() + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintAfsendBrevResponseType + */ + public function getResult() + { + return parent::getResult(); + } +} diff --git a/src/Client/ServiceType/Spoerg.php b/src/Client/ServiceType/Spoerg.php new file mode 100644 index 0000000..05de11c --- /dev/null +++ b/src/Client/ServiceType/Spoerg.php @@ -0,0 +1,47 @@ +setResult($resultSpoergTilmelding = $this->getSoapClient()->__soapCall('spoergTilmelding', [ + $request, + ], [], [], $this->outputHeaders)); + + return $resultSpoergTilmelding; + } catch (SoapFault $soapFault) { + $this->saveLastError(__METHOD__, $soapFault); + + return false; + } + } + /** + * Returns the result + * @see AbstractSoapClientBase::getResult() + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintSpoergTilmeldingResponseType + */ + public function getResult() + { + return parent::getResult(); + } +} diff --git a/src/Client/StructType/AuthorityContextType.php b/src/Client/StructType/AuthorityContextType.php new file mode 100644 index 0000000..1412ae8 --- /dev/null +++ b/src/Client/StructType/AuthorityContextType.php @@ -0,0 +1,63 @@ +setMunicipalityCVR($municipalityCVR); + } + /** + * Get MunicipalityCVR value + * @return string + */ + public function getMunicipalityCVR(): string + { + return $this->MunicipalityCVR; + } + /** + * Set MunicipalityCVR value + * @param string $municipalityCVR + * @return \Drupal\os2forms_digital_post\Client\StructType\AuthorityContextType + */ + public function setMunicipalityCVR(string $municipalityCVR): self + { + // validation for constraint: string + if (!is_null($municipalityCVR) && !is_string($municipalityCVR)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($municipalityCVR, true), gettype($municipalityCVR)), __LINE__); + } + // validation for constraint: pattern([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) + if (!is_null($municipalityCVR) && !preg_match('/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/', $municipalityCVR)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/', var_export($municipalityCVR, true)), __LINE__); + } + $this->MunicipalityCVR = $municipalityCVR; + + return $this; + } +} diff --git a/src/Client/StructType/BilagSamlingType.php b/src/Client/StructType/BilagSamlingType.php new file mode 100644 index 0000000..78f5dda --- /dev/null +++ b/src/Client/StructType/BilagSamlingType.php @@ -0,0 +1,105 @@ +setBilag($bilag); + } + /** + * Get Bilag value + * @return \Drupal\os2forms_digital_post\Client\StructType\BilagType[] + */ + public function getBilag(): array + { + return $this->Bilag; + } + /** + * This method is responsible for validating the values passed to the setBilag method + * This method is willingly generated in order to preserve the one-line inline validation within the setBilag method + * @param array $values + * @return string A non-empty message if the values does not match the validation rules + */ + public static function validateBilagForArrayConstraintsFromSetBilag(array $values = []): string + { + $message = ''; + $invalidValues = []; + foreach ($values as $bilagSamlingTypeBilagItem) { + // validation for constraint: itemType + if (!$bilagSamlingTypeBilagItem instanceof \Drupal\os2forms_digital_post\Client\StructType\BilagType) { + $invalidValues[] = is_object($bilagSamlingTypeBilagItem) ? get_class($bilagSamlingTypeBilagItem) : sprintf('%s(%s)', gettype($bilagSamlingTypeBilagItem), var_export($bilagSamlingTypeBilagItem, true)); + } + } + if (!empty($invalidValues)) { + $message = sprintf('The Bilag property can only contain items of type \Drupal\os2forms_digital_post\Client\StructType\BilagType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); + } + unset($invalidValues); + + return $message; + } + /** + * Set Bilag value + * @throws InvalidArgumentException + * @param \Drupal\os2forms_digital_post\Client\StructType\BilagType[] $bilag + * @return \Drupal\os2forms_digital_post\Client\StructType\BilagSamlingType + */ + public function setBilag(array $bilag = []): self + { + // validation for constraint: array + if ('' !== ($bilagArrayErrorMessage = self::validateBilagForArrayConstraintsFromSetBilag($bilag))) { + throw new InvalidArgumentException($bilagArrayErrorMessage, __LINE__); + } + // validation for constraint: maxOccurs(100) + if (is_array($bilag) && count($bilag) > 100) { + throw new InvalidArgumentException(sprintf('Invalid count of %s, the number of elements contained by the property must be less than or equal to 100', count($bilag)), __LINE__); + } + $this->Bilag = $bilag; + + return $this; + } + /** + * Add item to Bilag value + * @throws InvalidArgumentException + * @param \Drupal\os2forms_digital_post\Client\StructType\BilagType $item + * @return \Drupal\os2forms_digital_post\Client\StructType\BilagSamlingType + */ + public function addToBilag(\Drupal\os2forms_digital_post\Client\StructType\BilagType $item): self + { + // validation for constraint: itemType + if (!$item instanceof \Drupal\os2forms_digital_post\Client\StructType\BilagType) { + throw new InvalidArgumentException(sprintf('The Bilag property can only contain items of type \Drupal\os2forms_digital_post\Client\StructType\BilagType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); + } + // validation for constraint: maxOccurs(100) + if (is_array($this->Bilag) && count($this->Bilag) >= 100) { + throw new InvalidArgumentException(sprintf('You can\'t add anymore element to this property that already contains %s elements, the number of elements contained by the property must be less than or equal to 100', count($this->Bilag)), __LINE__); + } + $this->Bilag[] = $item; + + return $this; + } +} diff --git a/src/Client/StructType/BilagType.php b/src/Client/StructType/BilagType.php new file mode 100644 index 0000000..889b8ac --- /dev/null +++ b/src/Client/StructType/BilagType.php @@ -0,0 +1,452 @@ +setBilagNavn($bilagNavn) + ->setFilformatNavn($filformatNavn) + ->setBilagSorteringsIndeksIdentifikator($bilagSorteringsIndeksIdentifikator) + ->setBilagIdentifikator($bilagIdentifikator) + ->setVedhaeftningIndholdData($vedhaeftningIndholdData) + ->setVedhaeftningIndholdURLreference($vedhaeftningIndholdURLreference) + ->setVedhaeftSomIndholdDataIndikator($vedhaeftSomIndholdDataIndikator); + } + /** + * Get BilagNavn value + * @return string|null + */ + public function getBilagNavn(): ?string + { + return $this->BilagNavn; + } + /** + * Set BilagNavn value + * @param string $bilagNavn + * @return \Drupal\os2forms_digital_post\Client\StructType\BilagType + */ + public function setBilagNavn(?string $bilagNavn = null): self + { + // validation for constraint: string + if (!is_null($bilagNavn) && !is_string($bilagNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($bilagNavn, true), gettype($bilagNavn)), __LINE__); + } + // validation for constraint: maxLength(300) + if (!is_null($bilagNavn) && mb_strlen((string) $bilagNavn) > 300) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 300', mb_strlen((string) $bilagNavn)), __LINE__); + } + $this->BilagNavn = $bilagNavn; + + return $this; + } + /** + * Get FilformatNavn value + * @return string|null + */ + public function getFilformatNavn(): ?string + { + return $this->FilformatNavn; + } + /** + * Set FilformatNavn value + * @param string $filformatNavn + * @return \Drupal\os2forms_digital_post\Client\StructType\BilagType + */ + public function setFilformatNavn(?string $filformatNavn = null): self + { + // validation for constraint: string + if (!is_null($filformatNavn) && !is_string($filformatNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($filformatNavn, true), gettype($filformatNavn)), __LINE__); + } + // validation for constraint: maxLength(10) + if (!is_null($filformatNavn) && mb_strlen((string) $filformatNavn) > 10) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 10', mb_strlen((string) $filformatNavn)), __LINE__); + } + $this->FilformatNavn = $filformatNavn; + + return $this; + } + /** + * Get BilagSorteringsIndeksIdentifikator value + * @return int|null + */ + public function getBilagSorteringsIndeksIdentifikator(): ?int + { + return $this->BilagSorteringsIndeksIdentifikator; + } + /** + * Set BilagSorteringsIndeksIdentifikator value + * @param int $bilagSorteringsIndeksIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\BilagType + */ + public function setBilagSorteringsIndeksIdentifikator(?int $bilagSorteringsIndeksIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($bilagSorteringsIndeksIdentifikator) && !(is_int($bilagSorteringsIndeksIdentifikator) || ctype_digit($bilagSorteringsIndeksIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($bilagSorteringsIndeksIdentifikator, true), gettype($bilagSorteringsIndeksIdentifikator)), __LINE__); + } + $this->BilagSorteringsIndeksIdentifikator = $bilagSorteringsIndeksIdentifikator; + + return $this; + } + /** + * Get BilagIdentifikator value + * @return string|null + */ + public function getBilagIdentifikator(): ?string + { + return isset($this->BilagIdentifikator) ? $this->BilagIdentifikator : null; + } + /** + * This method is responsible for validating the value passed to the setBilagIdentifikator method + * This method is willingly generated in order to preserve the one-line inline validation within the setBilagIdentifikator method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateBilagIdentifikatorForChoiceConstraintsFromSetBilagIdentifikator($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'VedhaeftningIndholdData', + 'VedhaeftningIndholdURLreference', + 'VedhaeftSomIndholdDataIndikator', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property BilagIdentifikator can\'t be set as the property %s is already set. Only one property must be set among these properties: BilagIdentifikator, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set BilagIdentifikator value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $bilagIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\BilagType + */ + public function setBilagIdentifikator(?string $bilagIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($bilagIdentifikator) && !is_string($bilagIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($bilagIdentifikator, true), gettype($bilagIdentifikator)), __LINE__); + } + // validation for constraint: choice(BilagIdentifikator, VedhaeftningIndholdData, VedhaeftningIndholdURLreference, VedhaeftSomIndholdDataIndikator) + if ('' !== ($bilagIdentifikatorChoiceErrorMessage = self::validateBilagIdentifikatorForChoiceConstraintsFromSetBilagIdentifikator($bilagIdentifikator))) { + throw new InvalidArgumentException($bilagIdentifikatorChoiceErrorMessage, __LINE__); + } + // validation for constraint: maxLength(10) + if (!is_null($bilagIdentifikator) && mb_strlen((string) $bilagIdentifikator) > 10) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 10', mb_strlen((string) $bilagIdentifikator)), __LINE__); + } + if (is_null($bilagIdentifikator) || (is_array($bilagIdentifikator) && empty($bilagIdentifikator))) { + unset($this->BilagIdentifikator); + } else { + $this->BilagIdentifikator = $bilagIdentifikator; + } + + return $this; + } + /** + * Get VedhaeftningIndholdData value + * @return string|null + */ + public function getVedhaeftningIndholdData(): ?string + { + return isset($this->VedhaeftningIndholdData) ? $this->VedhaeftningIndholdData : null; + } + /** + * This method is responsible for validating the value passed to the setVedhaeftningIndholdData method + * This method is willingly generated in order to preserve the one-line inline validation within the setVedhaeftningIndholdData method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateVedhaeftningIndholdDataForChoiceConstraintsFromSetVedhaeftningIndholdData($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'BilagIdentifikator', + 'VedhaeftningIndholdURLreference', + 'VedhaeftSomIndholdDataIndikator', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property VedhaeftningIndholdData can\'t be set as the property %s is already set. Only one property must be set among these properties: VedhaeftningIndholdData, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set VedhaeftningIndholdData value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $vedhaeftningIndholdData + * @return \Drupal\os2forms_digital_post\Client\StructType\BilagType + */ + public function setVedhaeftningIndholdData(?string $vedhaeftningIndholdData = null): self + { + // validation for constraint: string + if (!is_null($vedhaeftningIndholdData) && !is_string($vedhaeftningIndholdData)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($vedhaeftningIndholdData, true), gettype($vedhaeftningIndholdData)), __LINE__); + } + // validation for constraint: choice(BilagIdentifikator, VedhaeftningIndholdData, VedhaeftningIndholdURLreference, VedhaeftSomIndholdDataIndikator) + if ('' !== ($vedhaeftningIndholdDataChoiceErrorMessage = self::validateVedhaeftningIndholdDataForChoiceConstraintsFromSetVedhaeftningIndholdData($vedhaeftningIndholdData))) { + throw new InvalidArgumentException($vedhaeftningIndholdDataChoiceErrorMessage, __LINE__); + } + if (is_null($vedhaeftningIndholdData) || (is_array($vedhaeftningIndholdData) && empty($vedhaeftningIndholdData))) { + unset($this->VedhaeftningIndholdData); + } else { + $this->VedhaeftningIndholdData = $vedhaeftningIndholdData; + } + + return $this; + } + /** + * Get VedhaeftningIndholdURLreference value + * @return string|null + */ + public function getVedhaeftningIndholdURLreference(): ?string + { + return isset($this->VedhaeftningIndholdURLreference) ? $this->VedhaeftningIndholdURLreference : null; + } + /** + * This method is responsible for validating the value passed to the setVedhaeftningIndholdURLreference method + * This method is willingly generated in order to preserve the one-line inline validation within the setVedhaeftningIndholdURLreference method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateVedhaeftningIndholdURLreferenceForChoiceConstraintsFromSetVedhaeftningIndholdURLreference($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'BilagIdentifikator', + 'VedhaeftningIndholdData', + 'VedhaeftSomIndholdDataIndikator', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property VedhaeftningIndholdURLreference can\'t be set as the property %s is already set. Only one property must be set among these properties: VedhaeftningIndholdURLreference, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set VedhaeftningIndholdURLreference value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $vedhaeftningIndholdURLreference + * @return \Drupal\os2forms_digital_post\Client\StructType\BilagType + */ + public function setVedhaeftningIndholdURLreference(?string $vedhaeftningIndholdURLreference = null): self + { + // validation for constraint: string + if (!is_null($vedhaeftningIndholdURLreference) && !is_string($vedhaeftningIndholdURLreference)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($vedhaeftningIndholdURLreference, true), gettype($vedhaeftningIndholdURLreference)), __LINE__); + } + // validation for constraint: choice(BilagIdentifikator, VedhaeftningIndholdData, VedhaeftningIndholdURLreference, VedhaeftSomIndholdDataIndikator) + if ('' !== ($vedhaeftningIndholdURLreferenceChoiceErrorMessage = self::validateVedhaeftningIndholdURLreferenceForChoiceConstraintsFromSetVedhaeftningIndholdURLreference($vedhaeftningIndholdURLreference))) { + throw new InvalidArgumentException($vedhaeftningIndholdURLreferenceChoiceErrorMessage, __LINE__); + } + if (is_null($vedhaeftningIndholdURLreference) || (is_array($vedhaeftningIndholdURLreference) && empty($vedhaeftningIndholdURLreference))) { + unset($this->VedhaeftningIndholdURLreference); + } else { + $this->VedhaeftningIndholdURLreference = $vedhaeftningIndholdURLreference; + } + + return $this; + } + /** + * Get VedhaeftSomIndholdDataIndikator value + * @return bool|null + */ + public function getVedhaeftSomIndholdDataIndikator(): ?bool + { + return isset($this->VedhaeftSomIndholdDataIndikator) ? $this->VedhaeftSomIndholdDataIndikator : null; + } + /** + * This method is responsible for validating the value passed to the setVedhaeftSomIndholdDataIndikator method + * This method is willingly generated in order to preserve the one-line inline validation within the setVedhaeftSomIndholdDataIndikator method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateVedhaeftSomIndholdDataIndikatorForChoiceConstraintsFromSetVedhaeftSomIndholdDataIndikator($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'BilagIdentifikator', + 'VedhaeftningIndholdData', + 'VedhaeftningIndholdURLreference', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property VedhaeftSomIndholdDataIndikator can\'t be set as the property %s is already set. Only one property must be set among these properties: VedhaeftSomIndholdDataIndikator, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set VedhaeftSomIndholdDataIndikator value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param bool $vedhaeftSomIndholdDataIndikator + * @return \Drupal\os2forms_digital_post\Client\StructType\BilagType + */ + public function setVedhaeftSomIndholdDataIndikator(?bool $vedhaeftSomIndholdDataIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($vedhaeftSomIndholdDataIndikator) && !is_bool($vedhaeftSomIndholdDataIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($vedhaeftSomIndholdDataIndikator, true), gettype($vedhaeftSomIndholdDataIndikator)), __LINE__); + } + // validation for constraint: choice(BilagIdentifikator, VedhaeftningIndholdData, VedhaeftningIndholdURLreference, VedhaeftSomIndholdDataIndikator) + if ('' !== ($vedhaeftSomIndholdDataIndikatorChoiceErrorMessage = self::validateVedhaeftSomIndholdDataIndikatorForChoiceConstraintsFromSetVedhaeftSomIndholdDataIndikator($vedhaeftSomIndholdDataIndikator))) { + throw new InvalidArgumentException($vedhaeftSomIndholdDataIndikatorChoiceErrorMessage, __LINE__); + } + if (is_null($vedhaeftSomIndholdDataIndikator) || (is_array($vedhaeftSomIndholdDataIndikator) && empty($vedhaeftSomIndholdDataIndikator))) { + unset($this->VedhaeftSomIndholdDataIndikator); + } else { + $this->VedhaeftSomIndholdDataIndikator = $vedhaeftSomIndholdDataIndikator; + } + + return $this; + } +} diff --git a/src/Client/StructType/BrevSPBodyType.php b/src/Client/StructType/BrevSPBodyType.php new file mode 100644 index 0000000..ee5f5e7 --- /dev/null +++ b/src/Client/StructType/BrevSPBodyType.php @@ -0,0 +1,127 @@ +setKanalvalg($kanalvalg) + ->setPrioritet($prioritet) + ->setForsendelseI($forsendelseI); + } + /** + * Get Kanalvalg value + * @return string + */ + public function getKanalvalg(): string + { + return $this->Kanalvalg; + } + /** + * Set Kanalvalg value + * @uses \Drupal\os2forms_digital_post\Client\EnumType\KanalvalgType::valueIsValid() + * @uses \Drupal\os2forms_digital_post\Client\EnumType\KanalvalgType::getValidValues() + * @throws InvalidArgumentException + * @param string $kanalvalg + * @return \Drupal\os2forms_digital_post\Client\StructType\BrevSPBodyType + */ + public function setKanalvalg(string $kanalvalg): self + { + // validation for constraint: enumeration + if (!\Drupal\os2forms_digital_post\Client\EnumType\KanalvalgType::valueIsValid($kanalvalg)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \Drupal\os2forms_digital_post\Client\EnumType\KanalvalgType', is_array($kanalvalg) ? implode(', ', $kanalvalg) : var_export($kanalvalg, true), implode(', ', \Drupal\os2forms_digital_post\Client\EnumType\KanalvalgType::getValidValues())), __LINE__); + } + $this->Kanalvalg = $kanalvalg; + + return $this; + } + /** + * Get Prioritet value + * @return string + */ + public function getPrioritet(): string + { + return $this->Prioritet; + } + /** + * Set Prioritet value + * @uses \Drupal\os2forms_digital_post\Client\EnumType\PrioritetType::valueIsValid() + * @uses \Drupal\os2forms_digital_post\Client\EnumType\PrioritetType::getValidValues() + * @throws InvalidArgumentException + * @param string $prioritet + * @return \Drupal\os2forms_digital_post\Client\StructType\BrevSPBodyType + */ + public function setPrioritet(string $prioritet): self + { + // validation for constraint: enumeration + if (!\Drupal\os2forms_digital_post\Client\EnumType\PrioritetType::valueIsValid($prioritet)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \Drupal\os2forms_digital_post\Client\EnumType\PrioritetType', is_array($prioritet) ? implode(', ', $prioritet) : var_export($prioritet, true), implode(', ', \Drupal\os2forms_digital_post\Client\EnumType\PrioritetType::getValidValues())), __LINE__); + } + $this->Prioritet = $prioritet; + + return $this; + } + /** + * Get ForsendelseI value + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function getForsendelseI(): \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + { + return $this->ForsendelseI; + } + /** + * Set ForsendelseI value + * @param \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType $forsendelseI + * @return \Drupal\os2forms_digital_post\Client\StructType\BrevSPBodyType + */ + public function setForsendelseI(\Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType $forsendelseI): self + { + $this->ForsendelseI = $forsendelseI; + + return $this; + } +} diff --git a/src/Client/StructType/CallContextType.php b/src/Client/StructType/CallContextType.php new file mode 100644 index 0000000..1038b51 --- /dev/null +++ b/src/Client/StructType/CallContextType.php @@ -0,0 +1,146 @@ +setOnBehalfOfUser($onBehalfOfUser) + ->setCallersServiceCallIdentifier($callersServiceCallIdentifier) + ->setAccountingInfo($accountingInfo); + } + /** + * Get OnBehalfOfUser value + * @return string|null + */ + public function getOnBehalfOfUser(): ?string + { + return $this->OnBehalfOfUser; + } + /** + * Set OnBehalfOfUser value + * @param string $onBehalfOfUser + * @return \Drupal\os2forms_digital_post\Client\StructType\CallContextType + */ + public function setOnBehalfOfUser(?string $onBehalfOfUser = null): self + { + // validation for constraint: string + if (!is_null($onBehalfOfUser) && !is_string($onBehalfOfUser)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($onBehalfOfUser, true), gettype($onBehalfOfUser)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($onBehalfOfUser) && mb_strlen((string) $onBehalfOfUser) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $onBehalfOfUser)), __LINE__); + } + $this->OnBehalfOfUser = $onBehalfOfUser; + + return $this; + } + /** + * Get CallersServiceCallIdentifier value + * @return string|null + */ + public function getCallersServiceCallIdentifier(): ?string + { + return $this->CallersServiceCallIdentifier; + } + /** + * Set CallersServiceCallIdentifier value + * @param string $callersServiceCallIdentifier + * @return \Drupal\os2forms_digital_post\Client\StructType\CallContextType + */ + public function setCallersServiceCallIdentifier(?string $callersServiceCallIdentifier = null): self + { + // validation for constraint: string + if (!is_null($callersServiceCallIdentifier) && !is_string($callersServiceCallIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callersServiceCallIdentifier, true), gettype($callersServiceCallIdentifier)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($callersServiceCallIdentifier) && mb_strlen((string) $callersServiceCallIdentifier) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $callersServiceCallIdentifier)), __LINE__); + } + $this->CallersServiceCallIdentifier = $callersServiceCallIdentifier; + + return $this; + } + /** + * Get AccountingInfo value + * @return string|null + */ + public function getAccountingInfo(): ?string + { + return $this->AccountingInfo; + } + /** + * Set AccountingInfo value + * @param string $accountingInfo + * @return \Drupal\os2forms_digital_post\Client\StructType\CallContextType + */ + public function setAccountingInfo(?string $accountingInfo = null): self + { + // validation for constraint: string + if (!is_null($accountingInfo) && !is_string($accountingInfo)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($accountingInfo, true), gettype($accountingInfo)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($accountingInfo) && mb_strlen((string) $accountingInfo) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $accountingInfo)), __LINE__); + } + $this->AccountingInfo = $accountingInfo; + + return $this; + } +} diff --git a/src/Client/StructType/CountryIdentificationCodeType.php b/src/Client/StructType/CountryIdentificationCodeType.php new file mode 100644 index 0000000..59b508a --- /dev/null +++ b/src/Client/StructType/CountryIdentificationCodeType.php @@ -0,0 +1,85 @@ +set_($_) + ->setScheme($scheme); + } + /** + * Get _ value + * @return string|null + */ + public function get_(): ?string + { + return $this->_; + } + /** + * Set _ value + * @param string $_ + * @return \Drupal\os2forms_digital_post\Client\StructType\CountryIdentificationCodeType + */ + public function set_(?string $_ = null): self + { + // validation for constraint: string + if (!is_null($_) && !is_string($_)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($_, true), gettype($_)), __LINE__); + } + $this->_ = $_; + + return $this; + } + /** + * Get scheme value + * @return string|null + */ + public function getScheme(): ?string + { + return $this->scheme; + } + /** + * Set scheme value + * @param string $scheme + * @return \Drupal\os2forms_digital_post\Client\StructType\CountryIdentificationCodeType + */ + public function setScheme(?string $scheme = null): self + { + // validation for constraint: string + if (!is_null($scheme) && !is_string($scheme)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($scheme, true), gettype($scheme)), __LINE__); + } + $this->scheme = $scheme; + + return $this; + } +} diff --git a/src/Client/StructType/DigitalPostParametreType.php b/src/Client/StructType/DigitalPostParametreType.php new file mode 100644 index 0000000..03a9c7f --- /dev/null +++ b/src/Client/StructType/DigitalPostParametreType.php @@ -0,0 +1,259 @@ +setAfsendelseDatoTid($afsendelseDatoTid) + ->setMeddelelseIndholdstypeIdentifikator($meddelelseIndholdstypeIdentifikator) + ->setMeddelelseSvarTypeNavn($meddelelseSvarTypeNavn) + ->setMeddelelseSvarPostkasseIdentifikator($meddelelseSvarPostkasseIdentifikator) + ->setMeddelelseSvarEmneIdentifikator($meddelelseSvarEmneIdentifikator) + ->setMeddelelseFESDmetadata($meddelelseFESDmetadata) + ->setMedsendDokumentRegistreringIndikator($medsendDokumentRegistreringIndikator); + } + /** + * Get AfsendelseDatoTid value + * @return string|null + */ + public function getAfsendelseDatoTid(): ?string + { + return $this->AfsendelseDatoTid; + } + /** + * Set AfsendelseDatoTid value + * @param string $afsendelseDatoTid + * @return \Drupal\os2forms_digital_post\Client\StructType\DigitalPostParametreType + */ + public function setAfsendelseDatoTid(?string $afsendelseDatoTid = null): self + { + // validation for constraint: string + if (!is_null($afsendelseDatoTid) && !is_string($afsendelseDatoTid)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($afsendelseDatoTid, true), gettype($afsendelseDatoTid)), __LINE__); + } + $this->AfsendelseDatoTid = $afsendelseDatoTid; + + return $this; + } + /** + * Get MeddelelseIndholdstypeIdentifikator value + * @return int|null + */ + public function getMeddelelseIndholdstypeIdentifikator(): ?int + { + return $this->MeddelelseIndholdstypeIdentifikator; + } + /** + * Set MeddelelseIndholdstypeIdentifikator value + * @param int $meddelelseIndholdstypeIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\DigitalPostParametreType + */ + public function setMeddelelseIndholdstypeIdentifikator(?int $meddelelseIndholdstypeIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($meddelelseIndholdstypeIdentifikator) && !(is_int($meddelelseIndholdstypeIdentifikator) || ctype_digit($meddelelseIndholdstypeIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($meddelelseIndholdstypeIdentifikator, true), gettype($meddelelseIndholdstypeIdentifikator)), __LINE__); + } + $this->MeddelelseIndholdstypeIdentifikator = $meddelelseIndholdstypeIdentifikator; + + return $this; + } + /** + * Get MeddelelseSvarTypeNavn value + * @return string|null + */ + public function getMeddelelseSvarTypeNavn(): ?string + { + return $this->MeddelelseSvarTypeNavn; + } + /** + * Set MeddelelseSvarTypeNavn value + * @uses \Drupal\os2forms_digital_post\Client\EnumType\MeddelelseSvarTypeNavnType::valueIsValid() + * @uses \Drupal\os2forms_digital_post\Client\EnumType\MeddelelseSvarTypeNavnType::getValidValues() + * @throws InvalidArgumentException + * @param string $meddelelseSvarTypeNavn + * @return \Drupal\os2forms_digital_post\Client\StructType\DigitalPostParametreType + */ + public function setMeddelelseSvarTypeNavn(?string $meddelelseSvarTypeNavn = null): self + { + // validation for constraint: enumeration + if (!\Drupal\os2forms_digital_post\Client\EnumType\MeddelelseSvarTypeNavnType::valueIsValid($meddelelseSvarTypeNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \Drupal\os2forms_digital_post\Client\EnumType\MeddelelseSvarTypeNavnType', is_array($meddelelseSvarTypeNavn) ? implode(', ', $meddelelseSvarTypeNavn) : var_export($meddelelseSvarTypeNavn, true), implode(', ', \Drupal\os2forms_digital_post\Client\EnumType\MeddelelseSvarTypeNavnType::getValidValues())), __LINE__); + } + $this->MeddelelseSvarTypeNavn = $meddelelseSvarTypeNavn; + + return $this; + } + /** + * Get MeddelelseSvarPostkasseIdentifikator value + * @return int|null + */ + public function getMeddelelseSvarPostkasseIdentifikator(): ?int + { + return $this->MeddelelseSvarPostkasseIdentifikator; + } + /** + * Set MeddelelseSvarPostkasseIdentifikator value + * @param int $meddelelseSvarPostkasseIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\DigitalPostParametreType + */ + public function setMeddelelseSvarPostkasseIdentifikator(?int $meddelelseSvarPostkasseIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($meddelelseSvarPostkasseIdentifikator) && !(is_int($meddelelseSvarPostkasseIdentifikator) || ctype_digit($meddelelseSvarPostkasseIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($meddelelseSvarPostkasseIdentifikator, true), gettype($meddelelseSvarPostkasseIdentifikator)), __LINE__); + } + $this->MeddelelseSvarPostkasseIdentifikator = $meddelelseSvarPostkasseIdentifikator; + + return $this; + } + /** + * Get MeddelelseSvarEmneIdentifikator value + * @return int|null + */ + public function getMeddelelseSvarEmneIdentifikator(): ?int + { + return $this->MeddelelseSvarEmneIdentifikator; + } + /** + * Set MeddelelseSvarEmneIdentifikator value + * @param int $meddelelseSvarEmneIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\DigitalPostParametreType + */ + public function setMeddelelseSvarEmneIdentifikator(?int $meddelelseSvarEmneIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($meddelelseSvarEmneIdentifikator) && !(is_int($meddelelseSvarEmneIdentifikator) || ctype_digit($meddelelseSvarEmneIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($meddelelseSvarEmneIdentifikator, true), gettype($meddelelseSvarEmneIdentifikator)), __LINE__); + } + $this->MeddelelseSvarEmneIdentifikator = $meddelelseSvarEmneIdentifikator; + + return $this; + } + /** + * Get MeddelelseFESDmetadata value + * @return \Drupal\os2forms_digital_post\Client\StructType\MeddelelseFESDmetadataType|null + */ + public function getMeddelelseFESDmetadata(): ?\Drupal\os2forms_digital_post\Client\StructType\MeddelelseFESDmetadataType + { + return $this->MeddelelseFESDmetadata; + } + /** + * Set MeddelelseFESDmetadata value + * @param \Drupal\os2forms_digital_post\Client\StructType\MeddelelseFESDmetadataType $meddelelseFESDmetadata + * @return \Drupal\os2forms_digital_post\Client\StructType\DigitalPostParametreType + */ + public function setMeddelelseFESDmetadata(?\Drupal\os2forms_digital_post\Client\StructType\MeddelelseFESDmetadataType $meddelelseFESDmetadata = null): self + { + $this->MeddelelseFESDmetadata = $meddelelseFESDmetadata; + + return $this; + } + /** + * Get MedsendDokumentRegistreringIndikator value + * @return bool|null + */ + public function getMedsendDokumentRegistreringIndikator(): ?bool + { + return $this->MedsendDokumentRegistreringIndikator; + } + /** + * Set MedsendDokumentRegistreringIndikator value + * @param bool $medsendDokumentRegistreringIndikator + * @return \Drupal\os2forms_digital_post\Client\StructType\DigitalPostParametreType + */ + public function setMedsendDokumentRegistreringIndikator(?bool $medsendDokumentRegistreringIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($medsendDokumentRegistreringIndikator) && !is_bool($medsendDokumentRegistreringIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($medsendDokumentRegistreringIndikator, true), gettype($medsendDokumentRegistreringIndikator)), __LINE__); + } + $this->MedsendDokumentRegistreringIndikator = $medsendDokumentRegistreringIndikator; + + return $this; + } +} diff --git a/src/Client/StructType/DokumentParametreType.php b/src/Client/StructType/DokumentParametreType.php new file mode 100644 index 0000000..336da3e --- /dev/null +++ b/src/Client/StructType/DokumentParametreType.php @@ -0,0 +1,155 @@ +setTitelTekst($titelTekst) + ->setUUIDIdentifikator($uUIDIdentifikator) + ->setBrevDato($brevDato) + ->setMeddelelsesFormatObjekt($meddelelsesFormatObjekt); + } + /** + * Get TitelTekst value + * @return string|null + */ + public function getTitelTekst(): ?string + { + return $this->TitelTekst; + } + /** + * Set TitelTekst value + * @param string $titelTekst + * @return \Drupal\os2forms_digital_post\Client\StructType\DokumentParametreType + */ + public function setTitelTekst(?string $titelTekst = null): self + { + // validation for constraint: string + if (!is_null($titelTekst) && !is_string($titelTekst)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($titelTekst, true), gettype($titelTekst)), __LINE__); + } + $this->TitelTekst = $titelTekst; + + return $this; + } + /** + * Get UUIDIdentifikator value + * @return string|null + */ + public function getUUIDIdentifikator(): ?string + { + return $this->UUIDIdentifikator; + } + /** + * Set UUIDIdentifikator value + * @param string $uUIDIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\DokumentParametreType + */ + public function setUUIDIdentifikator(?string $uUIDIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($uUIDIdentifikator) && !is_string($uUIDIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($uUIDIdentifikator, true), gettype($uUIDIdentifikator)), __LINE__); + } + $this->UUIDIdentifikator = $uUIDIdentifikator; + + return $this; + } + /** + * Get BrevDato value + * @return string|null + */ + public function getBrevDato(): ?string + { + return $this->BrevDato; + } + /** + * Set BrevDato value + * @param string $brevDato + * @return \Drupal\os2forms_digital_post\Client\StructType\DokumentParametreType + */ + public function setBrevDato(?string $brevDato = null): self + { + // validation for constraint: string + if (!is_null($brevDato) && !is_string($brevDato)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($brevDato, true), gettype($brevDato)), __LINE__); + } + $this->BrevDato = $brevDato; + + return $this; + } + /** + * Get MeddelelsesFormatObjekt value + * @return \Drupal\os2forms_digital_post\Client\StructType\MeddelelsesFormatObjektType|null + */ + public function getMeddelelsesFormatObjekt(): ?\Drupal\os2forms_digital_post\Client\StructType\MeddelelsesFormatObjektType + { + return $this->MeddelelsesFormatObjekt; + } + /** + * Set MeddelelsesFormatObjekt value + * @param \Drupal\os2forms_digital_post\Client\StructType\MeddelelsesFormatObjektType $meddelelsesFormatObjekt + * @return \Drupal\os2forms_digital_post\Client\StructType\DokumentParametreType + */ + public function setMeddelelsesFormatObjekt(?\Drupal\os2forms_digital_post\Client\StructType\MeddelelsesFormatObjektType $meddelelsesFormatObjekt = null): self + { + $this->MeddelelsesFormatObjekt = $meddelelsesFormatObjekt; + + return $this; + } +} diff --git a/src/Client/StructType/ErrorListType.php b/src/Client/StructType/ErrorListType.php new file mode 100644 index 0000000..8f8b4df --- /dev/null +++ b/src/Client/StructType/ErrorListType.php @@ -0,0 +1,97 @@ +setError($error); + } + /** + * Get Error value + * @return \Drupal\os2forms_digital_post\Client\StructType\ErrorType[] + */ + public function getError(): array + { + return $this->Error; + } + /** + * This method is responsible for validating the values passed to the setError method + * This method is willingly generated in order to preserve the one-line inline validation within the setError method + * @param array $values + * @return string A non-empty message if the values does not match the validation rules + */ + public static function validateErrorForArrayConstraintsFromSetError(array $values = []): string + { + $message = ''; + $invalidValues = []; + foreach ($values as $errorListTypeErrorItem) { + // validation for constraint: itemType + if (!$errorListTypeErrorItem instanceof \Drupal\os2forms_digital_post\Client\StructType\ErrorType) { + $invalidValues[] = is_object($errorListTypeErrorItem) ? get_class($errorListTypeErrorItem) : sprintf('%s(%s)', gettype($errorListTypeErrorItem), var_export($errorListTypeErrorItem, true)); + } + } + if (!empty($invalidValues)) { + $message = sprintf('The Error property can only contain items of type \Drupal\os2forms_digital_post\Client\StructType\ErrorType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues))); + } + unset($invalidValues); + + return $message; + } + /** + * Set Error value + * @throws InvalidArgumentException + * @param \Drupal\os2forms_digital_post\Client\StructType\ErrorType[] $error + * @return \Drupal\os2forms_digital_post\Client\StructType\ErrorListType + */ + public function setError(array $error): self + { + // validation for constraint: array + if ('' !== ($errorArrayErrorMessage = self::validateErrorForArrayConstraintsFromSetError($error))) { + throw new InvalidArgumentException($errorArrayErrorMessage, __LINE__); + } + $this->Error = $error; + + return $this; + } + /** + * Add item to Error value + * @throws InvalidArgumentException + * @param \Drupal\os2forms_digital_post\Client\StructType\ErrorType $item + * @return \Drupal\os2forms_digital_post\Client\StructType\ErrorListType + */ + public function addToError(\Drupal\os2forms_digital_post\Client\StructType\ErrorType $item): self + { + // validation for constraint: itemType + if (!$item instanceof \Drupal\os2forms_digital_post\Client\StructType\ErrorType) { + throw new InvalidArgumentException(sprintf('The Error property can only contain items of type \Drupal\os2forms_digital_post\Client\StructType\ErrorType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__); + } + $this->Error[] = $item; + + return $this; + } +} diff --git a/src/Client/StructType/ErrorType.php b/src/Client/StructType/ErrorType.php new file mode 100644 index 0000000..8c88392 --- /dev/null +++ b/src/Client/StructType/ErrorType.php @@ -0,0 +1,91 @@ +setErrorCode($errorCode) + ->setErrorText($errorText); + } + /** + * Get ErrorCode value + * @return string + */ + public function getErrorCode(): string + { + return $this->ErrorCode; + } + /** + * Set ErrorCode value + * @param string $errorCode + * @return \Drupal\os2forms_digital_post\Client\StructType\ErrorType + */ + public function setErrorCode(string $errorCode): self + { + // validation for constraint: string + if (!is_null($errorCode) && !is_string($errorCode)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorCode, true), gettype($errorCode)), __LINE__); + } + $this->ErrorCode = $errorCode; + + return $this; + } + /** + * Get ErrorText value + * @return string + */ + public function getErrorText(): string + { + return $this->ErrorText; + } + /** + * Set ErrorText value + * @param string $errorText + * @return \Drupal\os2forms_digital_post\Client\StructType\ErrorType + */ + public function setErrorText(string $errorText): self + { + // validation for constraint: string + if (!is_null($errorText) && !is_string($errorText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorText, true), gettype($errorText)), __LINE__); + } + $this->ErrorText = $errorText; + + return $this; + } +} diff --git a/src/Client/StructType/FejlType.php b/src/Client/StructType/FejlType.php new file mode 100644 index 0000000..9522387 --- /dev/null +++ b/src/Client/StructType/FejlType.php @@ -0,0 +1,146 @@ +setFejlKode($fejlKode) + ->setFejlTekst($fejlTekst) + ->setFejlIdentifikator($fejlIdentifikator); + } + /** + * Get FejlKode value + * @return int|null + */ + public function getFejlKode(): ?int + { + return $this->FejlKode; + } + /** + * Set FejlKode value + * @param int $fejlKode + * @return \Drupal\os2forms_digital_post\Client\StructType\FejlType + */ + public function setFejlKode(?int $fejlKode = null): self + { + // validation for constraint: int + if (!is_null($fejlKode) && !(is_int($fejlKode) || ctype_digit($fejlKode))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($fejlKode, true), gettype($fejlKode)), __LINE__); + } + // validation for constraint: maxInclusive(9999) + if (!is_null($fejlKode) && $fejlKode > 9999) { + throw new InvalidArgumentException(sprintf('Invalid value %s, the value must be numerically less than or equal to 9999', var_export($fejlKode, true)), __LINE__); + } + // validation for constraint: minInclusive(1000) + if (!is_null($fejlKode) && $fejlKode < 1000) { + throw new InvalidArgumentException(sprintf('Invalid value %s, the value must be numerically greater than or equal to 1000', var_export($fejlKode, true)), __LINE__); + } + $this->FejlKode = $fejlKode; + + return $this; + } + /** + * Get FejlTekst value + * @return string|null + */ + public function getFejlTekst(): ?string + { + return $this->FejlTekst; + } + /** + * Set FejlTekst value + * @param string $fejlTekst + * @return \Drupal\os2forms_digital_post\Client\StructType\FejlType + */ + public function setFejlTekst(?string $fejlTekst = null): self + { + // validation for constraint: string + if (!is_null($fejlTekst) && !is_string($fejlTekst)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fejlTekst, true), gettype($fejlTekst)), __LINE__); + } + // validation for constraint: maxLength(2048) + if (!is_null($fejlTekst) && mb_strlen((string) $fejlTekst) > 2048) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 2048', mb_strlen((string) $fejlTekst)), __LINE__); + } + $this->FejlTekst = $fejlTekst; + + return $this; + } + /** + * Get FejlIdentifikator value + * @return string|null + */ + public function getFejlIdentifikator(): ?string + { + return $this->FejlIdentifikator; + } + /** + * Set FejlIdentifikator value + * @param string $fejlIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\FejlType + */ + public function setFejlIdentifikator(?string $fejlIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($fejlIdentifikator) && !is_string($fejlIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fejlIdentifikator, true), gettype($fejlIdentifikator)), __LINE__); + } + // validation for constraint: maxLength(26) + if (!is_null($fejlIdentifikator) && mb_strlen((string) $fejlIdentifikator) > 26) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 26', mb_strlen((string) $fejlIdentifikator)), __LINE__); + } + $this->FejlIdentifikator = $fejlIdentifikator; + + return $this; + } +} diff --git a/src/Client/StructType/ForsendelseAfsenderType.php b/src/Client/StructType/ForsendelseAfsenderType.php new file mode 100644 index 0000000..0b9200d --- /dev/null +++ b/src/Client/StructType/ForsendelseAfsenderType.php @@ -0,0 +1,54 @@ +setAfsenderAdresse($afsenderAdresse); + } + /** + * Get AfsenderAdresse value + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType|null + */ + public function getAfsenderAdresse(): ?\Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + { + return $this->AfsenderAdresse; + } + /** + * Set AfsenderAdresse value + * @param \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType $afsenderAdresse + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseAfsenderType + */ + public function setAfsenderAdresse(?\Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType $afsenderAdresse = null): self + { + $this->AfsenderAdresse = $afsenderAdresse; + + return $this; + } +} diff --git a/src/Client/StructType/ForsendelseIType.php b/src/Client/StructType/ForsendelseIType.php new file mode 100644 index 0000000..3f056a7 --- /dev/null +++ b/src/Client/StructType/ForsendelseIType.php @@ -0,0 +1,413 @@ +setAfsendelseIdentifikator($afsendelseIdentifikator) + ->setForsendelseTypeIdentifikator($forsendelseTypeIdentifikator) + ->setForsendelseModtager($forsendelseModtager) + ->setFilformatNavn($filformatNavn) + ->setMeddelelseIndholdData($meddelelseIndholdData) + ->setTransaktionsParametreI($transaktionsParametreI) + ->setDokumentParametre($dokumentParametre) + ->setKanalUafhaengigeParametreI($kanalUafhaengigeParametreI) + ->setPrintParametre($printParametre) + ->setDigitalPostParametre($digitalPostParametre) + ->setPostParametre($postParametre) + ->setBilagSamling($bilagSamling); + } + /** + * Get AfsendelseIdentifikator value + * @return string|null + */ + public function getAfsendelseIdentifikator(): ?string + { + return $this->AfsendelseIdentifikator; + } + /** + * Set AfsendelseIdentifikator value + * @param string $afsendelseIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setAfsendelseIdentifikator(?string $afsendelseIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($afsendelseIdentifikator) && !is_string($afsendelseIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($afsendelseIdentifikator, true), gettype($afsendelseIdentifikator)), __LINE__); + } + // validation for constraint: maxLength(38) + if (!is_null($afsendelseIdentifikator) && mb_strlen((string) $afsendelseIdentifikator) > 38) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 38', mb_strlen((string) $afsendelseIdentifikator)), __LINE__); + } + // validation for constraint: minLength(1) + if (!is_null($afsendelseIdentifikator) && mb_strlen((string) $afsendelseIdentifikator) < 1) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be greater than or equal to 1', mb_strlen((string) $afsendelseIdentifikator)), __LINE__); + } + $this->AfsendelseIdentifikator = $afsendelseIdentifikator; + + return $this; + } + /** + * Get ForsendelseTypeIdentifikator value + * @return int|null + */ + public function getForsendelseTypeIdentifikator(): ?int + { + return $this->ForsendelseTypeIdentifikator; + } + /** + * Set ForsendelseTypeIdentifikator value + * @param int $forsendelseTypeIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setForsendelseTypeIdentifikator(?int $forsendelseTypeIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($forsendelseTypeIdentifikator) && !(is_int($forsendelseTypeIdentifikator) || ctype_digit($forsendelseTypeIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($forsendelseTypeIdentifikator, true), gettype($forsendelseTypeIdentifikator)), __LINE__); + } + $this->ForsendelseTypeIdentifikator = $forsendelseTypeIdentifikator; + + return $this; + } + /** + * Get ForsendelseModtager value + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseModtagerType|null + */ + public function getForsendelseModtager(): ?\Drupal\os2forms_digital_post\Client\StructType\ForsendelseModtagerType + { + return $this->ForsendelseModtager; + } + /** + * Set ForsendelseModtager value + * @param \Drupal\os2forms_digital_post\Client\StructType\ForsendelseModtagerType $forsendelseModtager + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setForsendelseModtager(?\Drupal\os2forms_digital_post\Client\StructType\ForsendelseModtagerType $forsendelseModtager = null): self + { + $this->ForsendelseModtager = $forsendelseModtager; + + return $this; + } + /** + * Get FilformatNavn value + * @return string|null + */ + public function getFilformatNavn(): ?string + { + return $this->FilformatNavn; + } + /** + * Set FilformatNavn value + * @param string $filformatNavn + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setFilformatNavn(?string $filformatNavn = null): self + { + // validation for constraint: string + if (!is_null($filformatNavn) && !is_string($filformatNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($filformatNavn, true), gettype($filformatNavn)), __LINE__); + } + // validation for constraint: maxLength(10) + if (!is_null($filformatNavn) && mb_strlen((string) $filformatNavn) > 10) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 10', mb_strlen((string) $filformatNavn)), __LINE__); + } + $this->FilformatNavn = $filformatNavn; + + return $this; + } + /** + * Get MeddelelseIndholdData value + * @return string|null + */ + public function getMeddelelseIndholdData(): ?string + { + return $this->MeddelelseIndholdData; + } + /** + * Set MeddelelseIndholdData value + * @param string $meddelelseIndholdData + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setMeddelelseIndholdData(?string $meddelelseIndholdData = null): self + { + // validation for constraint: string + if (!is_null($meddelelseIndholdData) && !is_string($meddelelseIndholdData)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($meddelelseIndholdData, true), gettype($meddelelseIndholdData)), __LINE__); + } + $this->MeddelelseIndholdData = $meddelelseIndholdData; + + return $this; + } + /** + * Get TransaktionsParametreI value + * @return \Drupal\os2forms_digital_post\Client\StructType\TransaktionsParametreIType|null + */ + public function getTransaktionsParametreI(): ?\Drupal\os2forms_digital_post\Client\StructType\TransaktionsParametreIType + { + return $this->TransaktionsParametreI; + } + /** + * Set TransaktionsParametreI value + * @param \Drupal\os2forms_digital_post\Client\StructType\TransaktionsParametreIType $transaktionsParametreI + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setTransaktionsParametreI(?\Drupal\os2forms_digital_post\Client\StructType\TransaktionsParametreIType $transaktionsParametreI = null): self + { + $this->TransaktionsParametreI = $transaktionsParametreI; + + return $this; + } + /** + * Get DokumentParametre value + * @return \Drupal\os2forms_digital_post\Client\StructType\DokumentParametreType|null + */ + public function getDokumentParametre(): ?\Drupal\os2forms_digital_post\Client\StructType\DokumentParametreType + { + return $this->DokumentParametre; + } + /** + * Set DokumentParametre value + * @param \Drupal\os2forms_digital_post\Client\StructType\DokumentParametreType $dokumentParametre + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setDokumentParametre(?\Drupal\os2forms_digital_post\Client\StructType\DokumentParametreType $dokumentParametre = null): self + { + $this->DokumentParametre = $dokumentParametre; + + return $this; + } + /** + * Get KanalUafhaengigeParametreI value + * @return \Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType|null + */ + public function getKanalUafhaengigeParametreI(): ?\Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType + { + return $this->KanalUafhaengigeParametreI; + } + /** + * Set KanalUafhaengigeParametreI value + * @param \Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType $kanalUafhaengigeParametreI + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setKanalUafhaengigeParametreI(?\Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType $kanalUafhaengigeParametreI = null): self + { + $this->KanalUafhaengigeParametreI = $kanalUafhaengigeParametreI; + + return $this; + } + /** + * Get PrintParametre value + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintParametreType|null + */ + public function getPrintParametre(): ?\Drupal\os2forms_digital_post\Client\StructType\PrintParametreType + { + return $this->PrintParametre; + } + /** + * Set PrintParametre value + * @param \Drupal\os2forms_digital_post\Client\StructType\PrintParametreType $printParametre + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setPrintParametre(?\Drupal\os2forms_digital_post\Client\StructType\PrintParametreType $printParametre = null): self + { + $this->PrintParametre = $printParametre; + + return $this; + } + /** + * Get DigitalPostParametre value + * @return \Drupal\os2forms_digital_post\Client\StructType\DigitalPostParametreType|null + */ + public function getDigitalPostParametre(): ?\Drupal\os2forms_digital_post\Client\StructType\DigitalPostParametreType + { + return $this->DigitalPostParametre; + } + /** + * Set DigitalPostParametre value + * @param \Drupal\os2forms_digital_post\Client\StructType\DigitalPostParametreType $digitalPostParametre + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setDigitalPostParametre(?\Drupal\os2forms_digital_post\Client\StructType\DigitalPostParametreType $digitalPostParametre = null): self + { + $this->DigitalPostParametre = $digitalPostParametre; + + return $this; + } + /** + * Get PostParametre value + * @return \Drupal\os2forms_digital_post\Client\StructType\PostParametreType|null + */ + public function getPostParametre(): ?\Drupal\os2forms_digital_post\Client\StructType\PostParametreType + { + return $this->PostParametre; + } + /** + * Set PostParametre value + * @param \Drupal\os2forms_digital_post\Client\StructType\PostParametreType $postParametre + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setPostParametre(?\Drupal\os2forms_digital_post\Client\StructType\PostParametreType $postParametre = null): self + { + $this->PostParametre = $postParametre; + + return $this; + } + /** + * Get BilagSamling value + * @return \Drupal\os2forms_digital_post\Client\StructType\BilagSamlingType|null + */ + public function getBilagSamling(): ?\Drupal\os2forms_digital_post\Client\StructType\BilagSamlingType + { + return $this->BilagSamling; + } + /** + * Set BilagSamling value + * @param \Drupal\os2forms_digital_post\Client\StructType\BilagSamlingType $bilagSamling + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseIType + */ + public function setBilagSamling(?\Drupal\os2forms_digital_post\Client\StructType\BilagSamlingType $bilagSamling = null): self + { + $this->BilagSamling = $bilagSamling; + + return $this; + } +} diff --git a/src/Client/StructType/ForsendelseModtagerType.php b/src/Client/StructType/ForsendelseModtagerType.php new file mode 100644 index 0000000..406e005 --- /dev/null +++ b/src/Client/StructType/ForsendelseModtagerType.php @@ -0,0 +1,85 @@ +setAfsendelseModtager($afsendelseModtager) + ->setModtagerAdresse($modtagerAdresse); + } + /** + * Get AfsendelseModtager value + * @return \Drupal\os2forms_digital_post\Client\StructType\SlutbrugerIdentitetType|null + */ + public function getAfsendelseModtager(): ?\Drupal\os2forms_digital_post\Client\StructType\SlutbrugerIdentitetType + { + return $this->AfsendelseModtager; + } + /** + * Set AfsendelseModtager value + * @param \Drupal\os2forms_digital_post\Client\StructType\SlutbrugerIdentitetType $afsendelseModtager + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseModtagerType + */ + public function setAfsendelseModtager(?\Drupal\os2forms_digital_post\Client\StructType\SlutbrugerIdentitetType $afsendelseModtager = null): self + { + $this->AfsendelseModtager = $afsendelseModtager; + + return $this; + } + /** + * Get ModtagerAdresse value + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType|null + */ + public function getModtagerAdresse(): ?\Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + { + return $this->ModtagerAdresse; + } + /** + * Set ModtagerAdresse value + * @param \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType $modtagerAdresse + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseModtagerType + */ + public function setModtagerAdresse(?\Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType $modtagerAdresse = null): self + { + $this->ModtagerAdresse = $modtagerAdresse; + + return $this; + } +} diff --git a/src/Client/StructType/InvocationContextType.php b/src/Client/StructType/InvocationContextType.php new file mode 100644 index 0000000..a754943 --- /dev/null +++ b/src/Client/StructType/InvocationContextType.php @@ -0,0 +1,310 @@ +setServiceAgreementUUID($serviceAgreementUUID) + ->setUserSystemUUID($userSystemUUID) + ->setUserUUID($userUUID) + ->setServiceUUID($serviceUUID) + ->setOnBehalfOfUser($onBehalfOfUser) + ->setCallersServiceCallIdentifier($callersServiceCallIdentifier) + ->setAccountingInfo($accountingInfo); + } + /** + * Get ServiceAgreementUUID value + * @return string + */ + public function getServiceAgreementUUID(): string + { + return $this->ServiceAgreementUUID; + } + /** + * Set ServiceAgreementUUID value + * @param string $serviceAgreementUUID + * @return \Drupal\os2forms_digital_post\Client\StructType\InvocationContextType + */ + public function setServiceAgreementUUID(string $serviceAgreementUUID): self + { + // validation for constraint: string + if (!is_null($serviceAgreementUUID) && !is_string($serviceAgreementUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($serviceAgreementUUID, true), gettype($serviceAgreementUUID)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($serviceAgreementUUID) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $serviceAgreementUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($serviceAgreementUUID, true)), __LINE__); + } + $this->ServiceAgreementUUID = $serviceAgreementUUID; + + return $this; + } + /** + * Get UserSystemUUID value + * @return string + */ + public function getUserSystemUUID(): string + { + return $this->UserSystemUUID; + } + /** + * Set UserSystemUUID value + * @param string $userSystemUUID + * @return \Drupal\os2forms_digital_post\Client\StructType\InvocationContextType + */ + public function setUserSystemUUID(string $userSystemUUID): self + { + // validation for constraint: string + if (!is_null($userSystemUUID) && !is_string($userSystemUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($userSystemUUID, true), gettype($userSystemUUID)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($userSystemUUID) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $userSystemUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($userSystemUUID, true)), __LINE__); + } + $this->UserSystemUUID = $userSystemUUID; + + return $this; + } + /** + * Get UserUUID value + * @return string + */ + public function getUserUUID(): string + { + return $this->UserUUID; + } + /** + * Set UserUUID value + * @param string $userUUID + * @return \Drupal\os2forms_digital_post\Client\StructType\InvocationContextType + */ + public function setUserUUID(string $userUUID): self + { + // validation for constraint: string + if (!is_null($userUUID) && !is_string($userUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($userUUID, true), gettype($userUUID)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($userUUID) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $userUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($userUUID, true)), __LINE__); + } + $this->UserUUID = $userUUID; + + return $this; + } + /** + * Get ServiceUUID value + * @return string + */ + public function getServiceUUID(): string + { + return $this->ServiceUUID; + } + /** + * Set ServiceUUID value + * @param string $serviceUUID + * @return \Drupal\os2forms_digital_post\Client\StructType\InvocationContextType + */ + public function setServiceUUID(string $serviceUUID): self + { + // validation for constraint: string + if (!is_null($serviceUUID) && !is_string($serviceUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($serviceUUID, true), gettype($serviceUUID)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($serviceUUID) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $serviceUUID)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($serviceUUID, true)), __LINE__); + } + $this->ServiceUUID = $serviceUUID; + + return $this; + } + /** + * Get OnBehalfOfUser value + * @return string|null + */ + public function getOnBehalfOfUser(): ?string + { + return $this->OnBehalfOfUser; + } + /** + * Set OnBehalfOfUser value + * @param string $onBehalfOfUser + * @return \Drupal\os2forms_digital_post\Client\StructType\InvocationContextType + */ + public function setOnBehalfOfUser(?string $onBehalfOfUser = null): self + { + // validation for constraint: string + if (!is_null($onBehalfOfUser) && !is_string($onBehalfOfUser)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($onBehalfOfUser, true), gettype($onBehalfOfUser)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($onBehalfOfUser) && mb_strlen((string) $onBehalfOfUser) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $onBehalfOfUser)), __LINE__); + } + $this->OnBehalfOfUser = $onBehalfOfUser; + + return $this; + } + /** + * Get CallersServiceCallIdentifier value + * @return string|null + */ + public function getCallersServiceCallIdentifier(): ?string + { + return $this->CallersServiceCallIdentifier; + } + /** + * Set CallersServiceCallIdentifier value + * @param string $callersServiceCallIdentifier + * @return \Drupal\os2forms_digital_post\Client\StructType\InvocationContextType + */ + public function setCallersServiceCallIdentifier(?string $callersServiceCallIdentifier = null): self + { + // validation for constraint: string + if (!is_null($callersServiceCallIdentifier) && !is_string($callersServiceCallIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($callersServiceCallIdentifier, true), gettype($callersServiceCallIdentifier)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($callersServiceCallIdentifier) && mb_strlen((string) $callersServiceCallIdentifier) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $callersServiceCallIdentifier)), __LINE__); + } + $this->CallersServiceCallIdentifier = $callersServiceCallIdentifier; + + return $this; + } + /** + * Get AccountingInfo value + * @return string|null + */ + public function getAccountingInfo(): ?string + { + return $this->AccountingInfo; + } + /** + * Set AccountingInfo value + * @param string $accountingInfo + * @return \Drupal\os2forms_digital_post\Client\StructType\InvocationContextType + */ + public function setAccountingInfo(?string $accountingInfo = null): self + { + // validation for constraint: string + if (!is_null($accountingInfo) && !is_string($accountingInfo)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($accountingInfo, true), gettype($accountingInfo)), __LINE__); + } + // validation for constraint: maxLength(255) + if (!is_null($accountingInfo) && mb_strlen((string) $accountingInfo) > 255) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 255', mb_strlen((string) $accountingInfo)), __LINE__); + } + $this->AccountingInfo = $accountingInfo; + + return $this; + } +} diff --git a/src/Client/StructType/KanalUafhaengigeParametreIType.php b/src/Client/StructType/KanalUafhaengigeParametreIType.php new file mode 100644 index 0000000..5bf10a1 --- /dev/null +++ b/src/Client/StructType/KanalUafhaengigeParametreIType.php @@ -0,0 +1,350 @@ +setEnhedTekst($enhedTekst) + ->setBrugerNavn($brugerNavn) + ->setKonteringsGruppeTekst($konteringsGruppeTekst) + ->setForsendelseAfsender($forsendelseAfsender) + ->setPaatrykAfsenderAdresseIndikator($paatrykAfsenderAdresseIndikator) + ->setPaatrykModtagerAdresseIndikator($paatrykModtagerAdresseIndikator) + ->setPaatrykBrevdatoIndikator($paatrykBrevdatoIndikator) + ->setKanalKode($kanalKode) + ->setHasteBrevIndikator($hasteBrevIndikator); + } + /** + * Get EnhedTekst value + * @return string|null + */ + public function getEnhedTekst(): ?string + { + return $this->EnhedTekst; + } + /** + * Set EnhedTekst value + * @param string $enhedTekst + * @return \Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType + */ + public function setEnhedTekst(?string $enhedTekst = null): self + { + // validation for constraint: string + if (!is_null($enhedTekst) && !is_string($enhedTekst)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($enhedTekst, true), gettype($enhedTekst)), __LINE__); + } + // validation for constraint: maxLength(2000) + if (!is_null($enhedTekst) && mb_strlen((string) $enhedTekst) > 2000) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 2000', mb_strlen((string) $enhedTekst)), __LINE__); + } + $this->EnhedTekst = $enhedTekst; + + return $this; + } + /** + * Get BrugerNavn value + * @return string|null + */ + public function getBrugerNavn(): ?string + { + return $this->BrugerNavn; + } + /** + * Set BrugerNavn value + * @param string $brugerNavn + * @return \Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType + */ + public function setBrugerNavn(?string $brugerNavn = null): self + { + // validation for constraint: string + if (!is_null($brugerNavn) && !is_string($brugerNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($brugerNavn, true), gettype($brugerNavn)), __LINE__); + } + // validation for constraint: maxLength(2000) + if (!is_null($brugerNavn) && mb_strlen((string) $brugerNavn) > 2000) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 2000', mb_strlen((string) $brugerNavn)), __LINE__); + } + // validation for constraint: minLength(1) + if (!is_null($brugerNavn) && mb_strlen((string) $brugerNavn) < 1) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be greater than or equal to 1', mb_strlen((string) $brugerNavn)), __LINE__); + } + $this->BrugerNavn = $brugerNavn; + + return $this; + } + /** + * Get KonteringsGruppeTekst value + * @return string|null + */ + public function getKonteringsGruppeTekst(): ?string + { + return $this->KonteringsGruppeTekst; + } + /** + * Set KonteringsGruppeTekst value + * @param string $konteringsGruppeTekst + * @return \Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType + */ + public function setKonteringsGruppeTekst(?string $konteringsGruppeTekst = null): self + { + // validation for constraint: string + if (!is_null($konteringsGruppeTekst) && !is_string($konteringsGruppeTekst)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($konteringsGruppeTekst, true), gettype($konteringsGruppeTekst)), __LINE__); + } + // validation for constraint: maxLength(2000) + if (!is_null($konteringsGruppeTekst) && mb_strlen((string) $konteringsGruppeTekst) > 2000) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 2000', mb_strlen((string) $konteringsGruppeTekst)), __LINE__); + } + $this->KonteringsGruppeTekst = $konteringsGruppeTekst; + + return $this; + } + /** + * Get ForsendelseAfsender value + * @return \Drupal\os2forms_digital_post\Client\StructType\ForsendelseAfsenderType|null + */ + public function getForsendelseAfsender(): ?\Drupal\os2forms_digital_post\Client\StructType\ForsendelseAfsenderType + { + return $this->ForsendelseAfsender; + } + /** + * Set ForsendelseAfsender value + * @param \Drupal\os2forms_digital_post\Client\StructType\ForsendelseAfsenderType $forsendelseAfsender + * @return \Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType + */ + public function setForsendelseAfsender(?\Drupal\os2forms_digital_post\Client\StructType\ForsendelseAfsenderType $forsendelseAfsender = null): self + { + $this->ForsendelseAfsender = $forsendelseAfsender; + + return $this; + } + /** + * Get PaatrykAfsenderAdresseIndikator value + * @return bool|null + */ + public function getPaatrykAfsenderAdresseIndikator(): ?bool + { + return $this->PaatrykAfsenderAdresseIndikator; + } + /** + * Set PaatrykAfsenderAdresseIndikator value + * @param bool $paatrykAfsenderAdresseIndikator + * @return \Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType + */ + public function setPaatrykAfsenderAdresseIndikator(?bool $paatrykAfsenderAdresseIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($paatrykAfsenderAdresseIndikator) && !is_bool($paatrykAfsenderAdresseIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($paatrykAfsenderAdresseIndikator, true), gettype($paatrykAfsenderAdresseIndikator)), __LINE__); + } + $this->PaatrykAfsenderAdresseIndikator = $paatrykAfsenderAdresseIndikator; + + return $this; + } + /** + * Get PaatrykModtagerAdresseIndikator value + * @return bool|null + */ + public function getPaatrykModtagerAdresseIndikator(): ?bool + { + return $this->PaatrykModtagerAdresseIndikator; + } + /** + * Set PaatrykModtagerAdresseIndikator value + * @param bool $paatrykModtagerAdresseIndikator + * @return \Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType + */ + public function setPaatrykModtagerAdresseIndikator(?bool $paatrykModtagerAdresseIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($paatrykModtagerAdresseIndikator) && !is_bool($paatrykModtagerAdresseIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($paatrykModtagerAdresseIndikator, true), gettype($paatrykModtagerAdresseIndikator)), __LINE__); + } + $this->PaatrykModtagerAdresseIndikator = $paatrykModtagerAdresseIndikator; + + return $this; + } + /** + * Get PaatrykBrevdatoIndikator value + * @return bool|null + */ + public function getPaatrykBrevdatoIndikator(): ?bool + { + return $this->PaatrykBrevdatoIndikator; + } + /** + * Set PaatrykBrevdatoIndikator value + * @param bool $paatrykBrevdatoIndikator + * @return \Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType + */ + public function setPaatrykBrevdatoIndikator(?bool $paatrykBrevdatoIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($paatrykBrevdatoIndikator) && !is_bool($paatrykBrevdatoIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($paatrykBrevdatoIndikator, true), gettype($paatrykBrevdatoIndikator)), __LINE__); + } + $this->PaatrykBrevdatoIndikator = $paatrykBrevdatoIndikator; + + return $this; + } + /** + * Get KanalKode value + * @return string|null + */ + public function getKanalKode(): ?string + { + return $this->KanalKode; + } + /** + * Set KanalKode value + * @uses \Drupal\os2forms_digital_post\Client\EnumType\KanalKodeType::valueIsValid() + * @uses \Drupal\os2forms_digital_post\Client\EnumType\KanalKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $kanalKode + * @return \Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType + */ + public function setKanalKode(?string $kanalKode = null): self + { + // validation for constraint: enumeration + if (!\Drupal\os2forms_digital_post\Client\EnumType\KanalKodeType::valueIsValid($kanalKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \Drupal\os2forms_digital_post\Client\EnumType\KanalKodeType', is_array($kanalKode) ? implode(', ', $kanalKode) : var_export($kanalKode, true), implode(', ', \Drupal\os2forms_digital_post\Client\EnumType\KanalKodeType::getValidValues())), __LINE__); + } + $this->KanalKode = $kanalKode; + + return $this; + } + /** + * Get HasteBrevIndikator value + * @return bool|null + */ + public function getHasteBrevIndikator(): ?bool + { + return $this->HasteBrevIndikator; + } + /** + * Set HasteBrevIndikator value + * @param bool $hasteBrevIndikator + * @return \Drupal\os2forms_digital_post\Client\StructType\KanalUafhaengigeParametreIType + */ + public function setHasteBrevIndikator(?bool $hasteBrevIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($hasteBrevIndikator) && !is_bool($hasteBrevIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($hasteBrevIndikator, true), gettype($hasteBrevIndikator)), __LINE__); + } + $this->HasteBrevIndikator = $hasteBrevIndikator; + + return $this; + } +} diff --git a/src/Client/StructType/KontaktOplysningType.php b/src/Client/StructType/KontaktOplysningType.php new file mode 100644 index 0000000..5b12dfe --- /dev/null +++ b/src/Client/StructType/KontaktOplysningType.php @@ -0,0 +1,1475 @@ +setPersonName($personName) + ->setCoNavn($coNavn) + ->setStreetName($streetName) + ->setStreetBuildingIdentifier($streetBuildingIdentifier) + ->setFloorIdentifier($floorIdentifier) + ->setSuiteIdentifier($suiteIdentifier) + ->setMailDeliverySublocationIdentifier($mailDeliverySublocationIdentifier) + ->setPostCodeIdentifier($postCodeIdentifier) + ->setDistrictSubdivisionIdentifier($districtSubdivisionIdentifier) + ->setPostOfficeBoxIdentifier($postOfficeBoxIdentifier) + ->setPostalAddressFirstLineText($postalAddressFirstLineText) + ->setPostalAddressSecondLineText($postalAddressSecondLineText) + ->setPostalAddressThirdLineText($postalAddressThirdLineText) + ->setPostalAddressFourthLineText($postalAddressFourthLineText) + ->setPostalAddressFifthLineText($postalAddressFifthLineText) + ->setPostalAddressSixthLineText($postalAddressSixthLineText) + ->setCountryIdentificationCode($countryIdentificationCode); + } + /** + * Get PersonName value + * @return string|null + */ + public function getPersonName(): ?string + { + return $this->PersonName; + } + /** + * Set PersonName value + * @param string $personName + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setPersonName(?string $personName = null): self + { + // validation for constraint: string + if (!is_null($personName) && !is_string($personName)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($personName, true), gettype($personName)), __LINE__); + } + $this->PersonName = $personName; + + return $this; + } + /** + * Get CoNavn value + * @return string|null + */ + public function getCoNavn(): ?string + { + return isset($this->CoNavn) ? $this->CoNavn : null; + } + /** + * This method is responsible for validating the value passed to the setCoNavn method + * This method is willingly generated in order to preserve the one-line inline validation within the setCoNavn method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateCoNavnForChoiceConstraintsFromSetCoNavn($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property CoNavn can\'t be set as the property %s is already set. Only one property must be set among these properties: CoNavn, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set CoNavn value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $coNavn + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setCoNavn(?string $coNavn = null): self + { + // validation for constraint: string + if (!is_null($coNavn) && !is_string($coNavn)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($coNavn, true), gettype($coNavn)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($coNavnChoiceErrorMessage = self::validateCoNavnForChoiceConstraintsFromSetCoNavn($coNavn))) { + throw new InvalidArgumentException($coNavnChoiceErrorMessage, __LINE__); + } + if (is_null($coNavn) || (is_array($coNavn) && empty($coNavn))) { + unset($this->CoNavn); + } else { + $this->CoNavn = $coNavn; + } + + return $this; + } + /** + * Get StreetName value + * @return string|null + */ + public function getStreetName(): ?string + { + return isset($this->StreetName) ? $this->StreetName : null; + } + /** + * This method is responsible for validating the value passed to the setStreetName method + * This method is willingly generated in order to preserve the one-line inline validation within the setStreetName method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateStreetNameForChoiceConstraintsFromSetStreetName($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property StreetName can\'t be set as the property %s is already set. Only one property must be set among these properties: StreetName, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set StreetName value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $streetName + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setStreetName(?string $streetName = null): self + { + // validation for constraint: string + if (!is_null($streetName) && !is_string($streetName)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($streetName, true), gettype($streetName)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($streetNameChoiceErrorMessage = self::validateStreetNameForChoiceConstraintsFromSetStreetName($streetName))) { + throw new InvalidArgumentException($streetNameChoiceErrorMessage, __LINE__); + } + if (is_null($streetName) || (is_array($streetName) && empty($streetName))) { + unset($this->StreetName); + } else { + $this->StreetName = $streetName; + } + + return $this; + } + /** + * Get StreetBuildingIdentifier value + * @return string|null + */ + public function getStreetBuildingIdentifier(): ?string + { + return isset($this->StreetBuildingIdentifier) ? $this->StreetBuildingIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setStreetBuildingIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setStreetBuildingIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateStreetBuildingIdentifierForChoiceConstraintsFromSetStreetBuildingIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property StreetBuildingIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: StreetBuildingIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set StreetBuildingIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $streetBuildingIdentifier + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setStreetBuildingIdentifier(?string $streetBuildingIdentifier = null): self + { + // validation for constraint: string + if (!is_null($streetBuildingIdentifier) && !is_string($streetBuildingIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($streetBuildingIdentifier, true), gettype($streetBuildingIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($streetBuildingIdentifierChoiceErrorMessage = self::validateStreetBuildingIdentifierForChoiceConstraintsFromSetStreetBuildingIdentifier($streetBuildingIdentifier))) { + throw new InvalidArgumentException($streetBuildingIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($streetBuildingIdentifier) || (is_array($streetBuildingIdentifier) && empty($streetBuildingIdentifier))) { + unset($this->StreetBuildingIdentifier); + } else { + $this->StreetBuildingIdentifier = $streetBuildingIdentifier; + } + + return $this; + } + /** + * Get FloorIdentifier value + * @return string|null + */ + public function getFloorIdentifier(): ?string + { + return isset($this->FloorIdentifier) ? $this->FloorIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setFloorIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setFloorIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateFloorIdentifierForChoiceConstraintsFromSetFloorIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property FloorIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: FloorIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set FloorIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $floorIdentifier + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setFloorIdentifier(?string $floorIdentifier = null): self + { + // validation for constraint: string + if (!is_null($floorIdentifier) && !is_string($floorIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($floorIdentifier, true), gettype($floorIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($floorIdentifierChoiceErrorMessage = self::validateFloorIdentifierForChoiceConstraintsFromSetFloorIdentifier($floorIdentifier))) { + throw new InvalidArgumentException($floorIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($floorIdentifier) || (is_array($floorIdentifier) && empty($floorIdentifier))) { + unset($this->FloorIdentifier); + } else { + $this->FloorIdentifier = $floorIdentifier; + } + + return $this; + } + /** + * Get SuiteIdentifier value + * @return string|null + */ + public function getSuiteIdentifier(): ?string + { + return isset($this->SuiteIdentifier) ? $this->SuiteIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setSuiteIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setSuiteIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateSuiteIdentifierForChoiceConstraintsFromSetSuiteIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property SuiteIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: SuiteIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set SuiteIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $suiteIdentifier + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setSuiteIdentifier(?string $suiteIdentifier = null): self + { + // validation for constraint: string + if (!is_null($suiteIdentifier) && !is_string($suiteIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($suiteIdentifier, true), gettype($suiteIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($suiteIdentifierChoiceErrorMessage = self::validateSuiteIdentifierForChoiceConstraintsFromSetSuiteIdentifier($suiteIdentifier))) { + throw new InvalidArgumentException($suiteIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($suiteIdentifier) || (is_array($suiteIdentifier) && empty($suiteIdentifier))) { + unset($this->SuiteIdentifier); + } else { + $this->SuiteIdentifier = $suiteIdentifier; + } + + return $this; + } + /** + * Get MailDeliverySublocationIdentifier value + * @return string|null + */ + public function getMailDeliverySublocationIdentifier(): ?string + { + return isset($this->MailDeliverySublocationIdentifier) ? $this->MailDeliverySublocationIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setMailDeliverySublocationIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setMailDeliverySublocationIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateMailDeliverySublocationIdentifierForChoiceConstraintsFromSetMailDeliverySublocationIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property MailDeliverySublocationIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: MailDeliverySublocationIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set MailDeliverySublocationIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $mailDeliverySublocationIdentifier + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setMailDeliverySublocationIdentifier(?string $mailDeliverySublocationIdentifier = null): self + { + // validation for constraint: string + if (!is_null($mailDeliverySublocationIdentifier) && !is_string($mailDeliverySublocationIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($mailDeliverySublocationIdentifier, true), gettype($mailDeliverySublocationIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($mailDeliverySublocationIdentifierChoiceErrorMessage = self::validateMailDeliverySublocationIdentifierForChoiceConstraintsFromSetMailDeliverySublocationIdentifier($mailDeliverySublocationIdentifier))) { + throw new InvalidArgumentException($mailDeliverySublocationIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($mailDeliverySublocationIdentifier) || (is_array($mailDeliverySublocationIdentifier) && empty($mailDeliverySublocationIdentifier))) { + unset($this->MailDeliverySublocationIdentifier); + } else { + $this->MailDeliverySublocationIdentifier = $mailDeliverySublocationIdentifier; + } + + return $this; + } + /** + * Get PostCodeIdentifier value + * @return string|null + */ + public function getPostCodeIdentifier(): ?string + { + return isset($this->PostCodeIdentifier) ? $this->PostCodeIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setPostCodeIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostCodeIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostCodeIdentifierForChoiceConstraintsFromSetPostCodeIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostCodeIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: PostCodeIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostCodeIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postCodeIdentifier + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setPostCodeIdentifier(?string $postCodeIdentifier = null): self + { + // validation for constraint: string + if (!is_null($postCodeIdentifier) && !is_string($postCodeIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postCodeIdentifier, true), gettype($postCodeIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postCodeIdentifierChoiceErrorMessage = self::validatePostCodeIdentifierForChoiceConstraintsFromSetPostCodeIdentifier($postCodeIdentifier))) { + throw new InvalidArgumentException($postCodeIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($postCodeIdentifier) || (is_array($postCodeIdentifier) && empty($postCodeIdentifier))) { + unset($this->PostCodeIdentifier); + } else { + $this->PostCodeIdentifier = $postCodeIdentifier; + } + + return $this; + } + /** + * Get DistrictSubdivisionIdentifier value + * @return string|null + */ + public function getDistrictSubdivisionIdentifier(): ?string + { + return isset($this->DistrictSubdivisionIdentifier) ? $this->DistrictSubdivisionIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setDistrictSubdivisionIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setDistrictSubdivisionIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateDistrictSubdivisionIdentifierForChoiceConstraintsFromSetDistrictSubdivisionIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property DistrictSubdivisionIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: DistrictSubdivisionIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set DistrictSubdivisionIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $districtSubdivisionIdentifier + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setDistrictSubdivisionIdentifier(?string $districtSubdivisionIdentifier = null): self + { + // validation for constraint: string + if (!is_null($districtSubdivisionIdentifier) && !is_string($districtSubdivisionIdentifier)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($districtSubdivisionIdentifier, true), gettype($districtSubdivisionIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($districtSubdivisionIdentifierChoiceErrorMessage = self::validateDistrictSubdivisionIdentifierForChoiceConstraintsFromSetDistrictSubdivisionIdentifier($districtSubdivisionIdentifier))) { + throw new InvalidArgumentException($districtSubdivisionIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($districtSubdivisionIdentifier) || (is_array($districtSubdivisionIdentifier) && empty($districtSubdivisionIdentifier))) { + unset($this->DistrictSubdivisionIdentifier); + } else { + $this->DistrictSubdivisionIdentifier = $districtSubdivisionIdentifier; + } + + return $this; + } + /** + * Get PostOfficeBoxIdentifier value + * @return int|null + */ + public function getPostOfficeBoxIdentifier(): ?int + { + return isset($this->PostOfficeBoxIdentifier) ? $this->PostOfficeBoxIdentifier : null; + } + /** + * This method is responsible for validating the value passed to the setPostOfficeBoxIdentifier method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostOfficeBoxIdentifier method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostOfficeBoxIdentifierForChoiceConstraintsFromSetPostOfficeBoxIdentifier($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostOfficeBoxIdentifier can\'t be set as the property %s is already set. Only one property must be set among these properties: PostOfficeBoxIdentifier, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostOfficeBoxIdentifier value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param int $postOfficeBoxIdentifier + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setPostOfficeBoxIdentifier(?int $postOfficeBoxIdentifier = null): self + { + // validation for constraint: int + if (!is_null($postOfficeBoxIdentifier) && !(is_int($postOfficeBoxIdentifier) || ctype_digit($postOfficeBoxIdentifier))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($postOfficeBoxIdentifier, true), gettype($postOfficeBoxIdentifier)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postOfficeBoxIdentifierChoiceErrorMessage = self::validatePostOfficeBoxIdentifierForChoiceConstraintsFromSetPostOfficeBoxIdentifier($postOfficeBoxIdentifier))) { + throw new InvalidArgumentException($postOfficeBoxIdentifierChoiceErrorMessage, __LINE__); + } + if (is_null($postOfficeBoxIdentifier) || (is_array($postOfficeBoxIdentifier) && empty($postOfficeBoxIdentifier))) { + unset($this->PostOfficeBoxIdentifier); + } else { + $this->PostOfficeBoxIdentifier = $postOfficeBoxIdentifier; + } + + return $this; + } + /** + * Get PostalAddressFirstLineText value + * @return string|null + */ + public function getPostalAddressFirstLineText(): ?string + { + return isset($this->PostalAddressFirstLineText) ? $this->PostalAddressFirstLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressFirstLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressFirstLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressFirstLineTextForChoiceConstraintsFromSetPostalAddressFirstLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressFirstLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressFirstLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressFirstLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressFirstLineText + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setPostalAddressFirstLineText(?string $postalAddressFirstLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressFirstLineText) && !is_string($postalAddressFirstLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressFirstLineText, true), gettype($postalAddressFirstLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressFirstLineTextChoiceErrorMessage = self::validatePostalAddressFirstLineTextForChoiceConstraintsFromSetPostalAddressFirstLineText($postalAddressFirstLineText))) { + throw new InvalidArgumentException($postalAddressFirstLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressFirstLineText) || (is_array($postalAddressFirstLineText) && empty($postalAddressFirstLineText))) { + unset($this->PostalAddressFirstLineText); + } else { + $this->PostalAddressFirstLineText = $postalAddressFirstLineText; + } + + return $this; + } + /** + * Get PostalAddressSecondLineText value + * @return string|null + */ + public function getPostalAddressSecondLineText(): ?string + { + return isset($this->PostalAddressSecondLineText) ? $this->PostalAddressSecondLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressSecondLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressSecondLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressSecondLineTextForChoiceConstraintsFromSetPostalAddressSecondLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressSecondLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressSecondLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressSecondLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressSecondLineText + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setPostalAddressSecondLineText(?string $postalAddressSecondLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressSecondLineText) && !is_string($postalAddressSecondLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressSecondLineText, true), gettype($postalAddressSecondLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressSecondLineTextChoiceErrorMessage = self::validatePostalAddressSecondLineTextForChoiceConstraintsFromSetPostalAddressSecondLineText($postalAddressSecondLineText))) { + throw new InvalidArgumentException($postalAddressSecondLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressSecondLineText) || (is_array($postalAddressSecondLineText) && empty($postalAddressSecondLineText))) { + unset($this->PostalAddressSecondLineText); + } else { + $this->PostalAddressSecondLineText = $postalAddressSecondLineText; + } + + return $this; + } + /** + * Get PostalAddressThirdLineText value + * @return string|null + */ + public function getPostalAddressThirdLineText(): ?string + { + return isset($this->PostalAddressThirdLineText) ? $this->PostalAddressThirdLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressThirdLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressThirdLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressThirdLineTextForChoiceConstraintsFromSetPostalAddressThirdLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressThirdLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressThirdLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressThirdLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressThirdLineText + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setPostalAddressThirdLineText(?string $postalAddressThirdLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressThirdLineText) && !is_string($postalAddressThirdLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressThirdLineText, true), gettype($postalAddressThirdLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressThirdLineTextChoiceErrorMessage = self::validatePostalAddressThirdLineTextForChoiceConstraintsFromSetPostalAddressThirdLineText($postalAddressThirdLineText))) { + throw new InvalidArgumentException($postalAddressThirdLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressThirdLineText) || (is_array($postalAddressThirdLineText) && empty($postalAddressThirdLineText))) { + unset($this->PostalAddressThirdLineText); + } else { + $this->PostalAddressThirdLineText = $postalAddressThirdLineText; + } + + return $this; + } + /** + * Get PostalAddressFourthLineText value + * @return string|null + */ + public function getPostalAddressFourthLineText(): ?string + { + return isset($this->PostalAddressFourthLineText) ? $this->PostalAddressFourthLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressFourthLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressFourthLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressFourthLineTextForChoiceConstraintsFromSetPostalAddressFourthLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFifthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressFourthLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressFourthLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressFourthLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressFourthLineText + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setPostalAddressFourthLineText(?string $postalAddressFourthLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressFourthLineText) && !is_string($postalAddressFourthLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressFourthLineText, true), gettype($postalAddressFourthLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressFourthLineTextChoiceErrorMessage = self::validatePostalAddressFourthLineTextForChoiceConstraintsFromSetPostalAddressFourthLineText($postalAddressFourthLineText))) { + throw new InvalidArgumentException($postalAddressFourthLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressFourthLineText) || (is_array($postalAddressFourthLineText) && empty($postalAddressFourthLineText))) { + unset($this->PostalAddressFourthLineText); + } else { + $this->PostalAddressFourthLineText = $postalAddressFourthLineText; + } + + return $this; + } + /** + * Get PostalAddressFifthLineText value + * @return string|null + */ + public function getPostalAddressFifthLineText(): ?string + { + return isset($this->PostalAddressFifthLineText) ? $this->PostalAddressFifthLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressFifthLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressFifthLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressFifthLineTextForChoiceConstraintsFromSetPostalAddressFifthLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressSixthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressFifthLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressFifthLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressFifthLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressFifthLineText + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setPostalAddressFifthLineText(?string $postalAddressFifthLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressFifthLineText) && !is_string($postalAddressFifthLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressFifthLineText, true), gettype($postalAddressFifthLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressFifthLineTextChoiceErrorMessage = self::validatePostalAddressFifthLineTextForChoiceConstraintsFromSetPostalAddressFifthLineText($postalAddressFifthLineText))) { + throw new InvalidArgumentException($postalAddressFifthLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressFifthLineText) || (is_array($postalAddressFifthLineText) && empty($postalAddressFifthLineText))) { + unset($this->PostalAddressFifthLineText); + } else { + $this->PostalAddressFifthLineText = $postalAddressFifthLineText; + } + + return $this; + } + /** + * Get PostalAddressSixthLineText value + * @return string|null + */ + public function getPostalAddressSixthLineText(): ?string + { + return isset($this->PostalAddressSixthLineText) ? $this->PostalAddressSixthLineText : null; + } + /** + * This method is responsible for validating the value passed to the setPostalAddressSixthLineText method + * This method is willingly generated in order to preserve the one-line inline validation within the setPostalAddressSixthLineText method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validatePostalAddressSixthLineTextForChoiceConstraintsFromSetPostalAddressSixthLineText($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CoNavn', + 'StreetName', + 'StreetBuildingIdentifier', + 'FloorIdentifier', + 'SuiteIdentifier', + 'MailDeliverySublocationIdentifier', + 'PostCodeIdentifier', + 'DistrictSubdivisionIdentifier', + 'PostOfficeBoxIdentifier', + 'PostalAddressFirstLineText', + 'PostalAddressSecondLineText', + 'PostalAddressThirdLineText', + 'PostalAddressFourthLineText', + 'PostalAddressFifthLineText', + 'PostCodeIdentifier', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property PostalAddressSixthLineText can\'t be set as the property %s is already set. Only one property must be set among these properties: PostalAddressSixthLineText, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set PostalAddressSixthLineText value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $postalAddressSixthLineText + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setPostalAddressSixthLineText(?string $postalAddressSixthLineText = null): self + { + // validation for constraint: string + if (!is_null($postalAddressSixthLineText) && !is_string($postalAddressSixthLineText)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalAddressSixthLineText, true), gettype($postalAddressSixthLineText)), __LINE__); + } + // validation for constraint: choice(CoNavn, StreetName, StreetBuildingIdentifier, FloorIdentifier, SuiteIdentifier, MailDeliverySublocationIdentifier, PostCodeIdentifier, DistrictSubdivisionIdentifier, PostOfficeBoxIdentifier, PostalAddressFirstLineText, PostalAddressSecondLineText, PostalAddressThirdLineText, PostalAddressFourthLineText, PostalAddressFifthLineText, PostalAddressSixthLineText) + if ('' !== ($postalAddressSixthLineTextChoiceErrorMessage = self::validatePostalAddressSixthLineTextForChoiceConstraintsFromSetPostalAddressSixthLineText($postalAddressSixthLineText))) { + throw new InvalidArgumentException($postalAddressSixthLineTextChoiceErrorMessage, __LINE__); + } + if (is_null($postalAddressSixthLineText) || (is_array($postalAddressSixthLineText) && empty($postalAddressSixthLineText))) { + unset($this->PostalAddressSixthLineText); + } else { + $this->PostalAddressSixthLineText = $postalAddressSixthLineText; + } + + return $this; + } + /** + * Get CountryIdentificationCode value + * @return \Drupal\os2forms_digital_post\Client\StructType\CountryIdentificationCodeType|null + */ + public function getCountryIdentificationCode(): ?\Drupal\os2forms_digital_post\Client\StructType\CountryIdentificationCodeType + { + return $this->CountryIdentificationCode; + } + /** + * Set CountryIdentificationCode value + * @param \Drupal\os2forms_digital_post\Client\StructType\CountryIdentificationCodeType $countryIdentificationCode + * @return \Drupal\os2forms_digital_post\Client\StructType\KontaktOplysningType + */ + public function setCountryIdentificationCode(?\Drupal\os2forms_digital_post\Client\StructType\CountryIdentificationCodeType $countryIdentificationCode = null): self + { + $this->CountryIdentificationCode = $countryIdentificationCode; + + return $this; + } +} diff --git a/src/Client/StructType/MeddelelseFESDmetadataType.php b/src/Client/StructType/MeddelelseFESDmetadataType.php new file mode 100644 index 0000000..f933c6f --- /dev/null +++ b/src/Client/StructType/MeddelelseFESDmetadataType.php @@ -0,0 +1,183 @@ +setFESDdokumentIdentifikator($fESDdokumentIdentifikator) + ->setFESDaktoerIdentifikator($fESDaktoerIdentifikator) + ->setFESDsagIdentifikator($fESDsagIdentifikator) + ->setFESDsagsklassifikationIdentifikator($fESDsagsklassifikationIdentifikator); + } + /** + * Get FESDdokumentIdentifikator value + * @return string|null + */ + public function getFESDdokumentIdentifikator(): ?string + { + return $this->FESDdokumentIdentifikator; + } + /** + * Set FESDdokumentIdentifikator value + * @param string $fESDdokumentIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\MeddelelseFESDmetadataType + */ + public function setFESDdokumentIdentifikator(?string $fESDdokumentIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($fESDdokumentIdentifikator) && !is_string($fESDdokumentIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fESDdokumentIdentifikator, true), gettype($fESDdokumentIdentifikator)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($fESDdokumentIdentifikator) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $fESDdokumentIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($fESDdokumentIdentifikator, true)), __LINE__); + } + $this->FESDdokumentIdentifikator = $fESDdokumentIdentifikator; + + return $this; + } + /** + * Get FESDaktoerIdentifikator value + * @return string|null + */ + public function getFESDaktoerIdentifikator(): ?string + { + return $this->FESDaktoerIdentifikator; + } + /** + * Set FESDaktoerIdentifikator value + * @param string $fESDaktoerIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\MeddelelseFESDmetadataType + */ + public function setFESDaktoerIdentifikator(?string $fESDaktoerIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($fESDaktoerIdentifikator) && !is_string($fESDaktoerIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fESDaktoerIdentifikator, true), gettype($fESDaktoerIdentifikator)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($fESDaktoerIdentifikator) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $fESDaktoerIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($fESDaktoerIdentifikator, true)), __LINE__); + } + $this->FESDaktoerIdentifikator = $fESDaktoerIdentifikator; + + return $this; + } + /** + * Get FESDsagIdentifikator value + * @return string|null + */ + public function getFESDsagIdentifikator(): ?string + { + return $this->FESDsagIdentifikator; + } + /** + * Set FESDsagIdentifikator value + * @param string $fESDsagIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\MeddelelseFESDmetadataType + */ + public function setFESDsagIdentifikator(?string $fESDsagIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($fESDsagIdentifikator) && !is_string($fESDsagIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fESDsagIdentifikator, true), gettype($fESDsagIdentifikator)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($fESDsagIdentifikator) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $fESDsagIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($fESDsagIdentifikator, true)), __LINE__); + } + $this->FESDsagIdentifikator = $fESDsagIdentifikator; + + return $this; + } + /** + * Get FESDsagsklassifikationIdentifikator value + * @return string|null + */ + public function getFESDsagsklassifikationIdentifikator(): ?string + { + return $this->FESDsagsklassifikationIdentifikator; + } + /** + * Set FESDsagsklassifikationIdentifikator value + * @param string $fESDsagsklassifikationIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\MeddelelseFESDmetadataType + */ + public function setFESDsagsklassifikationIdentifikator(?string $fESDsagsklassifikationIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($fESDsagsklassifikationIdentifikator) && !is_string($fESDsagsklassifikationIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fESDsagsklassifikationIdentifikator, true), gettype($fESDsagsklassifikationIdentifikator)), __LINE__); + } + // validation for constraint: pattern([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}, [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) + if (!is_null($fESDsagsklassifikationIdentifikator) && !preg_match('/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', $fESDsagsklassifikationIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', var_export($fESDsagsklassifikationIdentifikator, true)), __LINE__); + } + $this->FESDsagsklassifikationIdentifikator = $fESDsagsklassifikationIdentifikator; + + return $this; + } +} diff --git a/src/Client/StructType/MeddelelsesFormatObjektType.php b/src/Client/StructType/MeddelelsesFormatObjektType.php new file mode 100644 index 0000000..1fcdd1d --- /dev/null +++ b/src/Client/StructType/MeddelelsesFormatObjektType.php @@ -0,0 +1,64 @@ +setAny($any); + } + /** + * Get any value + * @uses \DOMDocument::loadXML() + * @param bool $asString true: returns XML string, false: returns \DOMDocument + * @return \DOMDocument|string|null + */ + public function getAny(bool $asDomDocument = false) + { + $domDocument = null; + if (!empty($this->any) && $asDomDocument) { + $domDocument = new \DOMDocument('1.0', 'UTF-8'); + $domDocument->loadXML($this->any); + } + return $asDomDocument ? $domDocument : $this->any; + } + /** + * Set any value + * @uses \DOMDocument::hasChildNodes() + * @uses \DOMDocument::saveXML() + * @uses \DOMNode::item() + * @param \DOMDocument|string|null $any + * @return \Drupal\os2forms_digital_post\Client\StructType\MeddelelsesFormatObjektType + */ + public function setAny($any = null): self + { + // validation for constraint: xml + if (!is_null($any) && !$any instanceof \DOMDocument && (!is_string($any) || (is_string($any) && (empty($any) || (($anyDoc = new \DOMDocument()) && false === $anyDoc->loadXML($any)))))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a valid XML string', var_export($any, true)), __LINE__); + } + $this->any = ($any instanceof \DOMDocument) ? $any->saveXML($any->hasChildNodes() ? $any->childNodes->item(0) : null) : $any; + + return $this; + } +} diff --git a/src/Client/StructType/PostParametreType.php b/src/Client/StructType/PostParametreType.php new file mode 100644 index 0000000..d4df4ef --- /dev/null +++ b/src/Client/StructType/PostParametreType.php @@ -0,0 +1,202 @@ +setPostKategoriKode($postKategoriKode) + ->setAllokeringsIdentifikator($allokeringsIdentifikator) + ->setReturposthaandteringHosLeverandoerIndikator($returposthaandteringHosLeverandoerIndikator) + ->setInformationVedAdresseAendringIndikator($informationVedAdresseAendringIndikator) + ->setSideKvantitet($sideKvantitet); + } + /** + * Get PostKategoriKode value + * @return string|null + */ + public function getPostKategoriKode(): ?string + { + return $this->PostKategoriKode; + } + /** + * Set PostKategoriKode value + * @uses \Drupal\os2forms_digital_post\Client\EnumType\PostKategoriKodeType::valueIsValid() + * @uses \Drupal\os2forms_digital_post\Client\EnumType\PostKategoriKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $postKategoriKode + * @return \Drupal\os2forms_digital_post\Client\StructType\PostParametreType + */ + public function setPostKategoriKode(?string $postKategoriKode = null): self + { + // validation for constraint: enumeration + if (!\Drupal\os2forms_digital_post\Client\EnumType\PostKategoriKodeType::valueIsValid($postKategoriKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \Drupal\os2forms_digital_post\Client\EnumType\PostKategoriKodeType', is_array($postKategoriKode) ? implode(', ', $postKategoriKode) : var_export($postKategoriKode, true), implode(', ', \Drupal\os2forms_digital_post\Client\EnumType\PostKategoriKodeType::getValidValues())), __LINE__); + } + $this->PostKategoriKode = $postKategoriKode; + + return $this; + } + /** + * Get AllokeringsIdentifikator value + * @return int|null + */ + public function getAllokeringsIdentifikator(): ?int + { + return $this->AllokeringsIdentifikator; + } + /** + * Set AllokeringsIdentifikator value + * @param int $allokeringsIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\PostParametreType + */ + public function setAllokeringsIdentifikator(?int $allokeringsIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($allokeringsIdentifikator) && !(is_int($allokeringsIdentifikator) || ctype_digit($allokeringsIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($allokeringsIdentifikator, true), gettype($allokeringsIdentifikator)), __LINE__); + } + $this->AllokeringsIdentifikator = $allokeringsIdentifikator; + + return $this; + } + /** + * Get ReturposthaandteringHosLeverandoerIndikator value + * @return bool|null + */ + public function getReturposthaandteringHosLeverandoerIndikator(): ?bool + { + return $this->ReturposthaandteringHosLeverandoerIndikator; + } + /** + * Set ReturposthaandteringHosLeverandoerIndikator value + * @param bool $returposthaandteringHosLeverandoerIndikator + * @return \Drupal\os2forms_digital_post\Client\StructType\PostParametreType + */ + public function setReturposthaandteringHosLeverandoerIndikator(?bool $returposthaandteringHosLeverandoerIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($returposthaandteringHosLeverandoerIndikator) && !is_bool($returposthaandteringHosLeverandoerIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($returposthaandteringHosLeverandoerIndikator, true), gettype($returposthaandteringHosLeverandoerIndikator)), __LINE__); + } + $this->ReturposthaandteringHosLeverandoerIndikator = $returposthaandteringHosLeverandoerIndikator; + + return $this; + } + /** + * Get InformationVedAdresseAendringIndikator value + * @return bool|null + */ + public function getInformationVedAdresseAendringIndikator(): ?bool + { + return $this->InformationVedAdresseAendringIndikator; + } + /** + * Set InformationVedAdresseAendringIndikator value + * @param bool $informationVedAdresseAendringIndikator + * @return \Drupal\os2forms_digital_post\Client\StructType\PostParametreType + */ + public function setInformationVedAdresseAendringIndikator(?bool $informationVedAdresseAendringIndikator = null): self + { + // validation for constraint: boolean + if (!is_null($informationVedAdresseAendringIndikator) && !is_bool($informationVedAdresseAendringIndikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($informationVedAdresseAendringIndikator, true), gettype($informationVedAdresseAendringIndikator)), __LINE__); + } + $this->InformationVedAdresseAendringIndikator = $informationVedAdresseAendringIndikator; + + return $this; + } + /** + * Get SideKvantitet value + * @return int|null + */ + public function getSideKvantitet(): ?int + { + return $this->SideKvantitet; + } + /** + * Set SideKvantitet value + * @param int $sideKvantitet + * @return \Drupal\os2forms_digital_post\Client\StructType\PostParametreType + */ + public function setSideKvantitet(?int $sideKvantitet = null): self + { + // validation for constraint: int + if (!is_null($sideKvantitet) && !(is_int($sideKvantitet) || ctype_digit($sideKvantitet))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($sideKvantitet, true), gettype($sideKvantitet)), __LINE__); + } + // validation for constraint: minInclusive + if (!is_null($sideKvantitet) && $sideKvantitet < 0) { + throw new InvalidArgumentException(sprintf('Invalid value %s, the value must be numerically greater than or equal to 0', var_export($sideKvantitet, true)), __LINE__); + } + $this->SideKvantitet = $sideKvantitet; + + return $this; + } +} diff --git a/src/Client/StructType/PrintAfsendBrevRequestType.php b/src/Client/StructType/PrintAfsendBrevRequestType.php new file mode 100644 index 0000000..98adae3 --- /dev/null +++ b/src/Client/StructType/PrintAfsendBrevRequestType.php @@ -0,0 +1,146 @@ +setBrevSPBody($brevSPBody) + ->setInvocationContext($invocationContext) + ->setAuthorityContext($authorityContext) + ->setCallContext($callContext); + } + /** + * Get BrevSPBody value + * @return \Drupal\os2forms_digital_post\Client\StructType\BrevSPBodyType + */ + public function getBrevSPBody(): \Drupal\os2forms_digital_post\Client\StructType\BrevSPBodyType + { + return $this->BrevSPBody; + } + /** + * Set BrevSPBody value + * @param \Drupal\os2forms_digital_post\Client\StructType\BrevSPBodyType $brevSPBody + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintAfsendBrevRequestType + */ + public function setBrevSPBody(\Drupal\os2forms_digital_post\Client\StructType\BrevSPBodyType $brevSPBody): self + { + $this->BrevSPBody = $brevSPBody; + + return $this; + } + /** + * Get InvocationContext value + * @return \Drupal\os2forms_digital_post\Client\StructType\InvocationContextType|null + */ + public function getInvocationContext(): ?\Drupal\os2forms_digital_post\Client\StructType\InvocationContextType + { + return $this->InvocationContext; + } + /** + * Set InvocationContext value + * @param \Drupal\os2forms_digital_post\Client\StructType\InvocationContextType $invocationContext + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintAfsendBrevRequestType + */ + public function setInvocationContext(?\Drupal\os2forms_digital_post\Client\StructType\InvocationContextType $invocationContext = null): self + { + $this->InvocationContext = $invocationContext; + + return $this; + } + /** + * Get AuthorityContext value + * @return \Drupal\os2forms_digital_post\Client\StructType\AuthorityContextType|null + */ + public function getAuthorityContext(): ?\Drupal\os2forms_digital_post\Client\StructType\AuthorityContextType + { + return $this->AuthorityContext; + } + /** + * Set AuthorityContext value + * @param \Drupal\os2forms_digital_post\Client\StructType\AuthorityContextType $authorityContext + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintAfsendBrevRequestType + */ + public function setAuthorityContext(?\Drupal\os2forms_digital_post\Client\StructType\AuthorityContextType $authorityContext = null): self + { + $this->AuthorityContext = $authorityContext; + + return $this; + } + /** + * Get CallContext value + * @return \Drupal\os2forms_digital_post\Client\StructType\CallContextType|null + */ + public function getCallContext(): ?\Drupal\os2forms_digital_post\Client\StructType\CallContextType + { + return $this->CallContext; + } + /** + * Set CallContext value + * @param \Drupal\os2forms_digital_post\Client\StructType\CallContextType $callContext + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintAfsendBrevRequestType + */ + public function setCallContext(?\Drupal\os2forms_digital_post\Client\StructType\CallContextType $callContext = null): self + { + $this->CallContext = $callContext; + + return $this; + } +} diff --git a/src/Client/StructType/PrintAfsendBrevResponseType.php b/src/Client/StructType/PrintAfsendBrevResponseType.php new file mode 100644 index 0000000..480d806 --- /dev/null +++ b/src/Client/StructType/PrintAfsendBrevResponseType.php @@ -0,0 +1,57 @@ +setResultat($resultat); + } + /** + * Get resultat value + * @return bool + */ + public function getResultat(): bool + { + return $this->resultat; + } + /** + * Set resultat value + * @param bool $resultat + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintAfsendBrevResponseType + */ + public function setResultat(bool $resultat): self + { + // validation for constraint: boolean + if (!is_null($resultat) && !is_bool($resultat)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($resultat, true), gettype($resultat)), __LINE__); + } + $this->resultat = $resultat; + + return $this; + } +} diff --git a/src/Client/StructType/PrintParametreType.php b/src/Client/StructType/PrintParametreType.php new file mode 100644 index 0000000..b2510d7 --- /dev/null +++ b/src/Client/StructType/PrintParametreType.php @@ -0,0 +1,134 @@ +setSimplexDuplexKode($simplexDuplexKode) + ->setFarveSHKode($farveSHKode) + ->setKuvertTypeKode($kuvertTypeKode); + } + /** + * Get SimplexDuplexKode value + * @return string|null + */ + public function getSimplexDuplexKode(): ?string + { + return $this->SimplexDuplexKode; + } + /** + * Set SimplexDuplexKode value + * @uses \Drupal\os2forms_digital_post\Client\EnumType\SimplexDuplexKodeType::valueIsValid() + * @uses \Drupal\os2forms_digital_post\Client\EnumType\SimplexDuplexKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $simplexDuplexKode + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintParametreType + */ + public function setSimplexDuplexKode(?string $simplexDuplexKode = null): self + { + // validation for constraint: enumeration + if (!\Drupal\os2forms_digital_post\Client\EnumType\SimplexDuplexKodeType::valueIsValid($simplexDuplexKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \Drupal\os2forms_digital_post\Client\EnumType\SimplexDuplexKodeType', is_array($simplexDuplexKode) ? implode(', ', $simplexDuplexKode) : var_export($simplexDuplexKode, true), implode(', ', \Drupal\os2forms_digital_post\Client\EnumType\SimplexDuplexKodeType::getValidValues())), __LINE__); + } + $this->SimplexDuplexKode = $simplexDuplexKode; + + return $this; + } + /** + * Get FarveSHKode value + * @return string|null + */ + public function getFarveSHKode(): ?string + { + return $this->FarveSHKode; + } + /** + * Set FarveSHKode value + * @uses \Drupal\os2forms_digital_post\Client\EnumType\FarveSHKodeType::valueIsValid() + * @uses \Drupal\os2forms_digital_post\Client\EnumType\FarveSHKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $farveSHKode + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintParametreType + */ + public function setFarveSHKode(?string $farveSHKode = null): self + { + // validation for constraint: enumeration + if (!\Drupal\os2forms_digital_post\Client\EnumType\FarveSHKodeType::valueIsValid($farveSHKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \Drupal\os2forms_digital_post\Client\EnumType\FarveSHKodeType', is_array($farveSHKode) ? implode(', ', $farveSHKode) : var_export($farveSHKode, true), implode(', ', \Drupal\os2forms_digital_post\Client\EnumType\FarveSHKodeType::getValidValues())), __LINE__); + } + $this->FarveSHKode = $farveSHKode; + + return $this; + } + /** + * Get KuvertTypeKode value + * @return string|null + */ + public function getKuvertTypeKode(): ?string + { + return $this->KuvertTypeKode; + } + /** + * Set KuvertTypeKode value + * @uses \Drupal\os2forms_digital_post\Client\EnumType\KuvertTypeKodeType::valueIsValid() + * @uses \Drupal\os2forms_digital_post\Client\EnumType\KuvertTypeKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $kuvertTypeKode + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintParametreType + */ + public function setKuvertTypeKode(?string $kuvertTypeKode = null): self + { + // validation for constraint: enumeration + if (!\Drupal\os2forms_digital_post\Client\EnumType\KuvertTypeKodeType::valueIsValid($kuvertTypeKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \Drupal\os2forms_digital_post\Client\EnumType\KuvertTypeKodeType', is_array($kuvertTypeKode) ? implode(', ', $kuvertTypeKode) : var_export($kuvertTypeKode, true), implode(', ', \Drupal\os2forms_digital_post\Client\EnumType\KuvertTypeKodeType::getValidValues())), __LINE__); + } + $this->KuvertTypeKode = $kuvertTypeKode; + + return $this; + } +} diff --git a/src/Client/StructType/PrintSpoergTilmeldingRequestType.php b/src/Client/StructType/PrintSpoergTilmeldingRequestType.php new file mode 100644 index 0000000..c6f367c --- /dev/null +++ b/src/Client/StructType/PrintSpoergTilmeldingRequestType.php @@ -0,0 +1,146 @@ +setTilmeldingRequest($tilmeldingRequest) + ->setInvocationContext($invocationContext) + ->setAuthorityContext($authorityContext) + ->setCallContext($callContext); + } + /** + * Get TilmeldingRequest value + * @return \Drupal\os2forms_digital_post\Client\StructType\TilmeldingRequestType + */ + public function getTilmeldingRequest(): \Drupal\os2forms_digital_post\Client\StructType\TilmeldingRequestType + { + return $this->TilmeldingRequest; + } + /** + * Set TilmeldingRequest value + * @param \Drupal\os2forms_digital_post\Client\StructType\TilmeldingRequestType $tilmeldingRequest + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintSpoergTilmeldingRequestType + */ + public function setTilmeldingRequest(\Drupal\os2forms_digital_post\Client\StructType\TilmeldingRequestType $tilmeldingRequest): self + { + $this->TilmeldingRequest = $tilmeldingRequest; + + return $this; + } + /** + * Get InvocationContext value + * @return \Drupal\os2forms_digital_post\Client\StructType\InvocationContextType|null + */ + public function getInvocationContext(): ?\Drupal\os2forms_digital_post\Client\StructType\InvocationContextType + { + return $this->InvocationContext; + } + /** + * Set InvocationContext value + * @param \Drupal\os2forms_digital_post\Client\StructType\InvocationContextType $invocationContext + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintSpoergTilmeldingRequestType + */ + public function setInvocationContext(?\Drupal\os2forms_digital_post\Client\StructType\InvocationContextType $invocationContext = null): self + { + $this->InvocationContext = $invocationContext; + + return $this; + } + /** + * Get AuthorityContext value + * @return \Drupal\os2forms_digital_post\Client\StructType\AuthorityContextType|null + */ + public function getAuthorityContext(): ?\Drupal\os2forms_digital_post\Client\StructType\AuthorityContextType + { + return $this->AuthorityContext; + } + /** + * Set AuthorityContext value + * @param \Drupal\os2forms_digital_post\Client\StructType\AuthorityContextType $authorityContext + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintSpoergTilmeldingRequestType + */ + public function setAuthorityContext(?\Drupal\os2forms_digital_post\Client\StructType\AuthorityContextType $authorityContext = null): self + { + $this->AuthorityContext = $authorityContext; + + return $this; + } + /** + * Get CallContext value + * @return \Drupal\os2forms_digital_post\Client\StructType\CallContextType|null + */ + public function getCallContext(): ?\Drupal\os2forms_digital_post\Client\StructType\CallContextType + { + return $this->CallContext; + } + /** + * Set CallContext value + * @param \Drupal\os2forms_digital_post\Client\StructType\CallContextType $callContext + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintSpoergTilmeldingRequestType + */ + public function setCallContext(?\Drupal\os2forms_digital_post\Client\StructType\CallContextType $callContext = null): self + { + $this->CallContext = $callContext; + + return $this; + } +} diff --git a/src/Client/StructType/PrintSpoergTilmeldingResponseType.php b/src/Client/StructType/PrintSpoergTilmeldingResponseType.php new file mode 100644 index 0000000..d86b48f --- /dev/null +++ b/src/Client/StructType/PrintSpoergTilmeldingResponseType.php @@ -0,0 +1,57 @@ +setTilmeldt($tilmeldt); + } + /** + * Get tilmeldt value + * @return bool + */ + public function getTilmeldt(): bool + { + return $this->tilmeldt; + } + /** + * Set tilmeldt value + * @param bool $tilmeldt + * @return \Drupal\os2forms_digital_post\Client\StructType\PrintSpoergTilmeldingResponseType + */ + public function setTilmeldt(bool $tilmeldt): self + { + // validation for constraint: boolean + if (!is_null($tilmeldt) && !is_bool($tilmeldt)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($tilmeldt, true), gettype($tilmeldt)), __LINE__); + } + $this->tilmeldt = $tilmeldt; + + return $this; + } +} diff --git a/src/Client/StructType/ServiceplatformFaultType.php b/src/Client/StructType/ServiceplatformFaultType.php new file mode 100644 index 0000000..586c80d --- /dev/null +++ b/src/Client/StructType/ServiceplatformFaultType.php @@ -0,0 +1,53 @@ +setErrorList($errorList); + } + /** + * Get ErrorList value + * @return \Drupal\os2forms_digital_post\Client\StructType\ErrorListType|null + */ + public function getErrorList(): ?\Drupal\os2forms_digital_post\Client\StructType\ErrorListType + { + return $this->ErrorList; + } + /** + * Set ErrorList value + * @param \Drupal\os2forms_digital_post\Client\StructType\ErrorListType $errorList + * @return \Drupal\os2forms_digital_post\Client\StructType\ServiceplatformFaultType + */ + public function setErrorList(?\Drupal\os2forms_digital_post\Client\StructType\ErrorListType $errorList = null): self + { + $this->ErrorList = $errorList; + + return $this; + } +} diff --git a/src/Client/StructType/SlutbrugerIdentitetType.php b/src/Client/StructType/SlutbrugerIdentitetType.php new file mode 100644 index 0000000..7248ec5 --- /dev/null +++ b/src/Client/StructType/SlutbrugerIdentitetType.php @@ -0,0 +1,187 @@ +setCPRnummerIdentifikator($cPRnummerIdentifikator) + ->setCVRnummerIdentifikator($cVRnummerIdentifikator); + } + /** + * Get CPRnummerIdentifikator value + * @return string|null + */ + public function getCPRnummerIdentifikator(): ?string + { + return isset($this->CPRnummerIdentifikator) ? $this->CPRnummerIdentifikator : null; + } + /** + * This method is responsible for validating the value passed to the setCPRnummerIdentifikator method + * This method is willingly generated in order to preserve the one-line inline validation within the setCPRnummerIdentifikator method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateCPRnummerIdentifikatorForChoiceConstraintsFromSetCPRnummerIdentifikator($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CVRnummerIdentifikator', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property CPRnummerIdentifikator can\'t be set as the property %s is already set. Only one property must be set among these properties: CPRnummerIdentifikator, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set CPRnummerIdentifikator value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $cPRnummerIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\SlutbrugerIdentitetType + */ + public function setCPRnummerIdentifikator(?string $cPRnummerIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($cPRnummerIdentifikator) && !is_string($cPRnummerIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cPRnummerIdentifikator, true), gettype($cPRnummerIdentifikator)), __LINE__); + } + // validation for constraint: choice(CPRnummerIdentifikator, CVRnummerIdentifikator) + if ('' !== ($cPRnummerIdentifikatorChoiceErrorMessage = self::validateCPRnummerIdentifikatorForChoiceConstraintsFromSetCPRnummerIdentifikator($cPRnummerIdentifikator))) { + throw new InvalidArgumentException($cPRnummerIdentifikatorChoiceErrorMessage, __LINE__); + } + // validation for constraint: pattern(((((0[1-9]|1[0-9]|2[0-9]|3[0-1])(01|03|05|07|08|10|12))|((0[1-9]|1[0-9]|2[0-9]|30)(04|06|09|11))|((0[1-9]|1[0-9]|2[0-9])(02)))[0-9]{6})|0000000000) + if (!is_null($cPRnummerIdentifikator) && !preg_match('/((((0[1-9]|1[0-9]|2[0-9]|3[0-1])(01|03|05|07|08|10|12))|((0[1-9]|1[0-9]|2[0-9]|30)(04|06|09|11))|((0[1-9]|1[0-9]|2[0-9])(02)))[0-9]{6})|0000000000/', $cPRnummerIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /((((0[1-9]|1[0-9]|2[0-9]|3[0-1])(01|03|05|07|08|10|12))|((0[1-9]|1[0-9]|2[0-9]|30)(04|06|09|11))|((0[1-9]|1[0-9]|2[0-9])(02)))[0-9]{6})|0000000000/', var_export($cPRnummerIdentifikator, true)), __LINE__); + } + if (is_null($cPRnummerIdentifikator) || (is_array($cPRnummerIdentifikator) && empty($cPRnummerIdentifikator))) { + unset($this->CPRnummerIdentifikator); + } else { + $this->CPRnummerIdentifikator = $cPRnummerIdentifikator; + } + + return $this; + } + /** + * Get CVRnummerIdentifikator value + * @return string|null + */ + public function getCVRnummerIdentifikator(): ?string + { + return isset($this->CVRnummerIdentifikator) ? $this->CVRnummerIdentifikator : null; + } + /** + * This method is responsible for validating the value passed to the setCVRnummerIdentifikator method + * This method is willingly generated in order to preserve the one-line inline validation within the setCVRnummerIdentifikator method + * This has to validate that the property which is being set is the only one among the given choices + * @param mixed $value + * @return string A non-empty message if the values does not match the validation rules + */ + public function validateCVRnummerIdentifikatorForChoiceConstraintsFromSetCVRnummerIdentifikator($value): string + { + $message = ''; + if (is_null($value)) { + return $message; + } + $properties = [ + 'CPRnummerIdentifikator', + ]; + try { + foreach ($properties as $property) { + if (isset($this->{$property})) { + throw new InvalidArgumentException(sprintf('The property CVRnummerIdentifikator can\'t be set as the property %s is already set. Only one property must be set among these properties: CVRnummerIdentifikator, %s.', $property, implode(', ', $properties)), __LINE__); + } + } + } catch (InvalidArgumentException $e) { + $message = $e->getMessage(); + } + + return $message; + } + /** + * Set CVRnummerIdentifikator value + * This property belongs to a choice that allows only one property to exist. It is + * therefore removable from the request, consequently if the value assigned to this + * property is null, the property is removed from this object + * @throws InvalidArgumentException + * @param string $cVRnummerIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\SlutbrugerIdentitetType + */ + public function setCVRnummerIdentifikator(?string $cVRnummerIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($cVRnummerIdentifikator) && !is_string($cVRnummerIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cVRnummerIdentifikator, true), gettype($cVRnummerIdentifikator)), __LINE__); + } + // validation for constraint: choice(CPRnummerIdentifikator, CVRnummerIdentifikator) + if ('' !== ($cVRnummerIdentifikatorChoiceErrorMessage = self::validateCVRnummerIdentifikatorForChoiceConstraintsFromSetCVRnummerIdentifikator($cVRnummerIdentifikator))) { + throw new InvalidArgumentException($cVRnummerIdentifikatorChoiceErrorMessage, __LINE__); + } + // validation for constraint: length(8) + if (!is_null($cVRnummerIdentifikator) && mb_strlen((string) $cVRnummerIdentifikator) !== 8) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be equal to 8', mb_strlen((string) $cVRnummerIdentifikator)), __LINE__); + } + if (is_null($cVRnummerIdentifikator) || (is_array($cVRnummerIdentifikator) && empty($cVRnummerIdentifikator))) { + unset($this->CVRnummerIdentifikator); + } else { + $this->CVRnummerIdentifikator = $cVRnummerIdentifikator; + } + + return $this; + } +} diff --git a/src/Client/StructType/TilmeldingRequestType.php b/src/Client/StructType/TilmeldingRequestType.php new file mode 100644 index 0000000..2235073 --- /dev/null +++ b/src/Client/StructType/TilmeldingRequestType.php @@ -0,0 +1,88 @@ +setSlutbrugerIdentitet($slutbrugerIdentitet) + ->setMeddelelseIndholdstypeIdentifikator($meddelelseIndholdstypeIdentifikator); + } + /** + * Get SlutbrugerIdentitet value + * @return \Drupal\os2forms_digital_post\Client\StructType\SlutbrugerIdentitetType + */ + public function getSlutbrugerIdentitet(): \Drupal\os2forms_digital_post\Client\StructType\SlutbrugerIdentitetType + { + return $this->SlutbrugerIdentitet; + } + /** + * Set SlutbrugerIdentitet value + * @param \Drupal\os2forms_digital_post\Client\StructType\SlutbrugerIdentitetType $slutbrugerIdentitet + * @return \Drupal\os2forms_digital_post\Client\StructType\TilmeldingRequestType + */ + public function setSlutbrugerIdentitet(\Drupal\os2forms_digital_post\Client\StructType\SlutbrugerIdentitetType $slutbrugerIdentitet): self + { + $this->SlutbrugerIdentitet = $slutbrugerIdentitet; + + return $this; + } + /** + * Get MeddelelseIndholdstypeIdentifikator value + * @return int|null + */ + public function getMeddelelseIndholdstypeIdentifikator(): ?int + { + return $this->MeddelelseIndholdstypeIdentifikator; + } + /** + * Set MeddelelseIndholdstypeIdentifikator value + * @param int $meddelelseIndholdstypeIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\TilmeldingRequestType + */ + public function setMeddelelseIndholdstypeIdentifikator(?int $meddelelseIndholdstypeIdentifikator = null): self + { + // validation for constraint: int + if (!is_null($meddelelseIndholdstypeIdentifikator) && !(is_int($meddelelseIndholdstypeIdentifikator) || ctype_digit($meddelelseIndholdstypeIdentifikator))) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($meddelelseIndholdstypeIdentifikator, true), gettype($meddelelseIndholdstypeIdentifikator)), __LINE__); + } + $this->MeddelelseIndholdstypeIdentifikator = $meddelelseIndholdstypeIdentifikator; + + return $this; + } +} diff --git a/src/Client/StructType/TransaktionsParametreIType.php b/src/Client/StructType/TransaktionsParametreIType.php new file mode 100644 index 0000000..8f002b9 --- /dev/null +++ b/src/Client/StructType/TransaktionsParametreIType.php @@ -0,0 +1,183 @@ +\(\)\[\]\\,;:@\s]{0,191}@[^>\(\)\[\]\\,;:@\s]{1,64}) + * - ref: fjernprint:KvitteringsEmail + * @var string|null + */ + protected ?string $KvitteringsEmail = null; + /** + * Constructor method for TransaktionsParametreIType + * @uses TransaktionsParametreIType::setTransaktionsDatoTid() + * @uses TransaktionsParametreIType::setMasseForsendelseIdentifikator() + * @uses TransaktionsParametreIType::setKvitteringsTypeKode() + * @uses TransaktionsParametreIType::setKvitteringsEmail() + * @param string $transaktionsDatoTid + * @param string $masseForsendelseIdentifikator + * @param string $kvitteringsTypeKode + * @param string $kvitteringsEmail + */ + public function __construct(?string $transaktionsDatoTid = null, ?string $masseForsendelseIdentifikator = null, ?string $kvitteringsTypeKode = null, ?string $kvitteringsEmail = null) + { + $this + ->setTransaktionsDatoTid($transaktionsDatoTid) + ->setMasseForsendelseIdentifikator($masseForsendelseIdentifikator) + ->setKvitteringsTypeKode($kvitteringsTypeKode) + ->setKvitteringsEmail($kvitteringsEmail); + } + /** + * Get TransaktionsDatoTid value + * @return string|null + */ + public function getTransaktionsDatoTid(): ?string + { + return $this->TransaktionsDatoTid; + } + /** + * Set TransaktionsDatoTid value + * @param string $transaktionsDatoTid + * @return \Drupal\os2forms_digital_post\Client\StructType\TransaktionsParametreIType + */ + public function setTransaktionsDatoTid(?string $transaktionsDatoTid = null): self + { + // validation for constraint: string + if (!is_null($transaktionsDatoTid) && !is_string($transaktionsDatoTid)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($transaktionsDatoTid, true), gettype($transaktionsDatoTid)), __LINE__); + } + $this->TransaktionsDatoTid = $transaktionsDatoTid; + + return $this; + } + /** + * Get MasseForsendelseIdentifikator value + * @return string|null + */ + public function getMasseForsendelseIdentifikator(): ?string + { + return $this->MasseForsendelseIdentifikator; + } + /** + * Set MasseForsendelseIdentifikator value + * @param string $masseForsendelseIdentifikator + * @return \Drupal\os2forms_digital_post\Client\StructType\TransaktionsParametreIType + */ + public function setMasseForsendelseIdentifikator(?string $masseForsendelseIdentifikator = null): self + { + // validation for constraint: string + if (!is_null($masseForsendelseIdentifikator) && !is_string($masseForsendelseIdentifikator)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($masseForsendelseIdentifikator, true), gettype($masseForsendelseIdentifikator)), __LINE__); + } + // validation for constraint: maxLength(38) + if (!is_null($masseForsendelseIdentifikator) && mb_strlen((string) $masseForsendelseIdentifikator) > 38) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be less than or equal to 38', mb_strlen((string) $masseForsendelseIdentifikator)), __LINE__); + } + // validation for constraint: minLength(1) + if (!is_null($masseForsendelseIdentifikator) && mb_strlen((string) $masseForsendelseIdentifikator) < 1) { + throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be greater than or equal to 1', mb_strlen((string) $masseForsendelseIdentifikator)), __LINE__); + } + $this->MasseForsendelseIdentifikator = $masseForsendelseIdentifikator; + + return $this; + } + /** + * Get KvitteringsTypeKode value + * @return string|null + */ + public function getKvitteringsTypeKode(): ?string + { + return $this->KvitteringsTypeKode; + } + /** + * Set KvitteringsTypeKode value + * @uses \Drupal\os2forms_digital_post\Client\EnumType\KvitteringsTypeKodeType::valueIsValid() + * @uses \Drupal\os2forms_digital_post\Client\EnumType\KvitteringsTypeKodeType::getValidValues() + * @throws InvalidArgumentException + * @param string $kvitteringsTypeKode + * @return \Drupal\os2forms_digital_post\Client\StructType\TransaktionsParametreIType + */ + public function setKvitteringsTypeKode(?string $kvitteringsTypeKode = null): self + { + // validation for constraint: enumeration + if (!\Drupal\os2forms_digital_post\Client\EnumType\KvitteringsTypeKodeType::valueIsValid($kvitteringsTypeKode)) { + throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \Drupal\os2forms_digital_post\Client\EnumType\KvitteringsTypeKodeType', is_array($kvitteringsTypeKode) ? implode(', ', $kvitteringsTypeKode) : var_export($kvitteringsTypeKode, true), implode(', ', \Drupal\os2forms_digital_post\Client\EnumType\KvitteringsTypeKodeType::getValidValues())), __LINE__); + } + $this->KvitteringsTypeKode = $kvitteringsTypeKode; + + return $this; + } + /** + * Get KvitteringsEmail value + * @return string|null + */ + public function getKvitteringsEmail(): ?string + { + return $this->KvitteringsEmail; + } + /** + * Set KvitteringsEmail value + * @param string $kvitteringsEmail + * @return \Drupal\os2forms_digital_post\Client\StructType\TransaktionsParametreIType + */ + public function setKvitteringsEmail(?string $kvitteringsEmail = null): self + { + // validation for constraint: string + if (!is_null($kvitteringsEmail) && !is_string($kvitteringsEmail)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($kvitteringsEmail, true), gettype($kvitteringsEmail)), __LINE__); + } + // validation for constraint: pattern(([^>\(\)\[\]\\,;:@\s]{0,191}@[^>\(\)\[\]\\,;:@\s]{1,64})) + if (!is_null($kvitteringsEmail) && !preg_match('/([^>\\(\\)\\[\\]\\\\,;:@\\s]{0,191}@[^>\\(\\)\\[\\]\\\\,;:@\\s]{1,64})/', $kvitteringsEmail)) { + throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression /([^>\\(\\)\\[\\]\\\\,;:@\\s]{0,191}@[^>\\(\\)\\[\\]\\\\,;:@\\s]{1,64})/', var_export($kvitteringsEmail, true)), __LINE__); + } + $this->KvitteringsEmail = $kvitteringsEmail; + + return $this; + } +} diff --git a/src/Consumer/PrintServiceConsumer.php b/src/Consumer/PrintServiceConsumer.php new file mode 100644 index 0000000..d25aef6 --- /dev/null +++ b/src/Consumer/PrintServiceConsumer.php @@ -0,0 +1,294 @@ +config = $configFactory->get('os2forms_digital_post'); + $this->guzzleClient = $guzzleClient; + $this->lock = $lock; + $this->state = $state; + $this->uuid = \Drupal::service('uuid'); + } + + public function afsendBrevPerson( + string $kanalValg = null, + string $prioritet = null, + string $cprNummerIdentifikator = null, + string $personName = null, + string $coNavn = null, + string $streetName = null, + string $streetBuildingIdentifier = null, + string $floorIdentifier = null, + string $suiteIdentifier = null, + string $mailDeliverySublocationIdentifier = null, + string $postCodeIdentifier = null, + string $districtSubdivisionIdentifier = null, + string $postOfficeBoxIdentifier = null, + string $countryIdentificationCode = null, + string $filFormatNavn = null, + string $meddelelseIndholdData = null, + string $titelTekst = null, + string $brevDato = null + ) { + + if (!$this->acquireLock()) { + $this->waitLock(); + } + + $invocationContext = new InvocationContextType( + $this->config->get('service_agreement_uuid'), + $this->config->get('user_system_uuid'), + $this->config->get('user_uuid'), + $this->config->get('service_uuid') + ); + + $slutBrugerIdentitetType = new SlutbrugerIdentitetType($cprNummerIdentifikator); + + $countryIdentificationCodeType = new CountryIdentificationCodeType($countryIdentificationCode); + + $kontaktOplysninger = new KontaktOplysningType( + $personName, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + $countryIdentificationCodeType + ); + + $forsendelsesModtager = new ForsendelseModtagerType($slutBrugerIdentitetType, $kontaktOplysninger); + + $dokumentParametre = new DokumentParametreType($titelTekst, $this->uuid->generate(), $brevDato); + $digitalPostParametre = new DigitalPostParametreType($brevDato, $this->config->get('digital_post_materiale_id')); + + $forsendelse = new ForsendelseIType( + $this->generateAfsendelseIdentifikator(), + $this->config->get('digital_post_materiale_id'), + $forsendelsesModtager, + $filFormatNavn, + $meddelelseIndholdData, + null, + $dokumentParametre, + null, + null, + $digitalPostParametre + ); + + $brevSPBody = new BrevSPBodyType($kanalValg, $prioritet, $forsendelse); + $request = new PrintAfsendBrevRequestType($brevSPBody, $invocationContext); + + $certificateLocator = $this->getAzureKeyVaultCertificateLocator( + $this->config->get('azure_tenant_id'), + $this->config->get('azure_application_id'), + $this->config->get('azure_client_secret'), + $this->config->get('azure_key_vault_name'), + $this->config->get('azure_key_vault_secret'), + $this->config->get('azure_key_vault_secret_version') + ); + + $client = new Afsend([ + AbstractSoapClientBase::WSDL_URL => $this->config->get('service_contract'), + AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get(), + AbstractSoapClientBase::WSDL_LOCAL_CERT => $certificateLocator->getAbsolutePathToCertificate(), + AbstractSoapClientBase::WSDL_LOCATION => $this->config->get('service_endpoint'), + ]); + + + $response = $client->afsendBrev($request); + + $this->releaseLock(); + + if (false === $response) { + $lastError = $client->getLastError(); + /* @var $soapError SoapFault */ + $soapError = $lastError['Drupal\os2forms_digital_post\Client\ServiceType\Afsend::afsendBrev']; + throw new Exception($soapError->getMessage(), $soapError->getCode()); // Should maybe log this instead! + } + + return $response->getResultat(); + } + + private function getAzureKeyVaultCertificateLocator( + string $tenantId, + string $applicationId, + string $clientSecret, + string $keyVaultName, + string $keyVaultSecret, + string $keyVaultSecretVersion + ): CertificateLocatorInterface { + $httpClient = new GuzzleAdapter($this->guzzleClient); + $requestFactory = new RequestFactory(); + + $vaultToken = new VaultToken($httpClient, $requestFactory); + + $token = $vaultToken->getToken( + $tenantId, + $applicationId, + $clientSecret + ); + + $vault = new VaultSecret( + $httpClient, + $requestFactory, + $keyVaultName, + $token->getAccessToken() + ); + + return new AzureKeyVaultCertificateLocator( + $vault, + $keyVaultSecret, + $keyVaultSecretVersion + ); + } + + public function afsendDigitalPostPerson( + string $kanalValg = null, + string $prioritet = null, + string $cprNummerIdentifikator = null, + string $filFormatNavn = null, + string $meddelelseIndholdData = null, + string $titelTekst = null + ): bool { + + if (!$this->acquireLock()) { + $this->waitLock(); + } + + $invocationContext = new InvocationContextType( + $this->config->get('service_agreement_uuid'), + $this->config->get('user_system_uuid'), + $this->config->get('user_uuid'), + $this->config->get('service_uuid') + ); + + $slutBrugerIdentitetType = new SlutbrugerIdentitetType($cprNummerIdentifikator); + + $forsendelsesModtager = new ForsendelseModtagerType($slutBrugerIdentitetType); + + $dokumentParametre = new DokumentParametreType($titelTekst); + $digitalPostParametre = new DigitalPostParametreType(null, $this->config->get('digital_post_materiale_id')); + + $forsendelse = new ForsendelseIType( + $this->generateAfsendelseIdentifikator(), + null, + $forsendelsesModtager, + $filFormatNavn, + $meddelelseIndholdData, + null, + $dokumentParametre, + null, + null, + $digitalPostParametre + ); + + $brevSPBody = new BrevSPBodyType($kanalValg, $prioritet, $forsendelse); + $request = new PrintAfsendBrevRequestType($brevSPBody, $invocationContext); + + $certificateLocator = $this->getAzureKeyVaultCertificateLocator( + $this->config->get('azure_tenant_id'), + $this->config->get('azure_application_id'), + $this->config->get('azure_client_secret'), + $this->config->get('azure_key_vault_name'), + $this->config->get('azure_key_vault_secret'), + $this->config->get('azure_key_vault_secret_version') + ); + + $client = new Afsend([ + AbstractSoapClientBase::WSDL_URL => $this->config->get('service_contract'), + AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get(), + AbstractSoapClientBase::WSDL_LOCAL_CERT => $certificateLocator->getAbsolutePathToCertificate(), + AbstractSoapClientBase::WSDL_LOCATION => $this->config->get('service_endpoint'), + ]); + + + $response = $client->afsendBrev($request); + + $this->releaseLock(); + + if (false === $response) { + $lastError = $client->getLastError(); + /* @var $soapError SoapFault */ + $soapError = $lastError['Drupal\os2forms_digital_post\Client\ServiceType\Afsend::afsendBrev']; + throw new \Exception($soapError->getMessage(), $soapError->getCode()); // Should maybe log this instead! + } + + return $response->getResultat(); + } + + protected function generateAfsendelseIdentifikator(): string { + + $stateKey = 'os2forms_digital_post_last_letter_counter'; + + $lastLetterCounter = $this->state->get($stateKey, 1); + + $nextLetterCounter = $lastLetterCounter + 1; + + $this->state->set($stateKey, $nextLetterCounter); + + $nextLetterNumber = str_pad(strval($nextLetterCounter), 21, '0', STR_PAD_LEFT); + + return $this->config->get('digital_post_system_id') + . $this->config->get('digital_post_afsender_system') + . $nextLetterNumber + ; + } + + protected function acquireLock(): bool { + return $this->lock->acquire($this->lockName); + } + + protected function releaseLock() { + $this->lock->release($this->lockName); + } + + protected function waitLock(): bool { + return $this->lock->wait($this->lockName); + } +} diff --git a/src/Manager/TemplateManager.php b/src/Manager/TemplateManager.php index acf7618..cd40a4f 100644 --- a/src/Manager/TemplateManager.php +++ b/src/Manager/TemplateManager.php @@ -4,6 +4,7 @@ use Dompdf\Css\Stylesheet; use Dompdf\Dompdf; +use Dompdf\Options; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Template\TwigEnvironment; use Twig\Loader\FilesystemLoader; @@ -52,11 +53,16 @@ public function renderPdf(string $template, array $context = [], bool $stream = $html = $this->renderHtml($template, $context); + + $options = new Options(); + $options->setIsHtml5ParserEnabled(true); $domPdf = new Dompdf(); + $domPdf->setPaper('A4', 'portrait'); $pathToCss = $this->getPathToTemplate($template) . '/styles.css'; - $stylesheet = new Stylesheet($domPdf); $cssAsString = file_get_contents($pathToCss); + + $stylesheet = new Stylesheet($domPdf); $stylesheet->load_css($cssAsString); $domPdf->setCss($stylesheet); diff --git a/src/Plugin/WebformHandler/DigitalPostWebformHandler.php b/src/Plugin/WebformHandler/DigitalPostWebformHandler.php index 89adad7..5b5eb13 100644 --- a/src/Plugin/WebformHandler/DigitalPostWebformHandler.php +++ b/src/Plugin/WebformHandler/DigitalPostWebformHandler.php @@ -2,12 +2,12 @@ namespace Drupal\os2forms_digital_post\Plugin\WebformHandler; -use Drupal\Component\Utility\Xss; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Logger\LoggerChannelFactoryInterface; -use Drupal\Core\Render\Markup; +use Drupal\os2forms_cpr_lookup\Service\CprServiceInterface; +use Drupal\os2forms_digital_post\Consumer\PrintServiceConsumer; use Drupal\os2forms_digital_post\Manager\TemplateManager; use Drupal\webform\Annotation\WebformHandler; use Drupal\webform\Plugin\WebformElementManagerInterface; @@ -49,14 +49,20 @@ class DigitalPostWebformHandler extends WebformHandlerBase private $templateManager; + private $printServiceConsumer; + + private $cprService; + /** * {@inheritdoc} */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerChannelFactoryInterface $logger_factory, ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager, WebformSubmissionConditionsValidatorInterface $conditions_validator, WebformTokenManagerInterface $token_manager, WebformElementManagerInterface $element_manager, TemplateManager $templateManager) { + public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerChannelFactoryInterface $logger_factory, ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager, WebformSubmissionConditionsValidatorInterface $conditions_validator, WebformTokenManagerInterface $token_manager, WebformElementManagerInterface $element_manager, TemplateManager $templateManager, PrintServiceConsumer $printServiceConsumer, CprServiceInterface $cprService) { parent::__construct($configuration, $plugin_id, $plugin_definition, $logger_factory, $config_factory, $entity_type_manager, $conditions_validator); $this->tokenManager = $token_manager; $this->elementManager = $element_manager; $this->templateManager = $templateManager; + $this->printServiceConsumer = $printServiceConsumer; + $this->cprService = $cprService; } /** @@ -74,6 +80,8 @@ public static function create(ContainerInterface $container, array $configuratio $container->get('webform.token_manager'), $container->get('plugin.manager.webform.element'), $container->get('os2forms_digital_post.template_manager'), + $container->get('os2forms_digital_post.print_service_consumer'), + $container->get('os2forms_cpr_lookup.service') ); } @@ -127,11 +135,8 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta '#type' => 'select', '#title' => $this->t('Select channel'), '#options' => [ - 'D' => $this->t('Digital Post'), -// 'F' => $this->t('Fysisk post'), -// 'A' => $this->t('Automatisk på SP'), -// 'P' => $this->t('Automatisk på Fjern-print'), -// 'S' => $this->t('Nem SMS'), + 'D' => $this->t('Digital Post'), // Only send the letter as Digital Post. + 'A' => $this->t('Automatisk'), // Serviceplatformen decides if a citizen should have digital or physical mail based on the citizens registration. ], '#default_value' => $this->configuration['channel'], ]; @@ -141,18 +146,19 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta '#title' => $this->t('Priority'), '#options' => [ 'D' => $this->t('Direkte'), -// 'M' => $this->t('Masseforsendelse') ], '#default_value' => $this->configuration['priority'], ]; $form['cpr_element'] = [ - '#type' => 'textfield', + '#type' => 'select', '#title' => $this->t('Element in form that contains the CPR number of the recipient'), '#required' => TRUE, '#default_value' => $this->configuration['cpr_element'], + '#options' => $availableElements, ]; + $form['document_title'] = [ '#type' => 'textfield', '#title' => $this->t('Title of document'), @@ -303,8 +309,22 @@ public function postSave(WebformSubmissionInterface $webform_submission, $update ]; } + /** @var \Drupal\os2forms_cpr_lookup\CPR\CprServiceResult $cprSearchResult */ + $cprSearchResult = $this->cprService->search($submissionData[$this->configuration['cpr_element']]); + + $recipient = [ + 'name' => $cprSearchResult->getName(), + 'streetName' => $cprSearchResult->getStreetName(), + 'streetNumber' => $cprSearchResult->getHouseNumber(), + 'floor' => $cprSearchResult->getFloor(), + 'side' => $cprSearchResult->getSide(), + 'postalCode' => $cprSearchResult->getPostalCode(), + 'city' => $cprSearchResult->getCity(), + ]; + $context = [ 'elements' => $elements, + 'recipient' => $recipient, ]; if (true === $this->configuration['debug']) { @@ -312,10 +332,45 @@ public function postSave(WebformSubmissionInterface $webform_submission, $update return; } - $pdf = $this->templateManager->renderPdf($this->configuration['template'], $context); + $result = false; + + switch ($this->configuration['channel']) { + case 'A': + $result = $this->printServiceConsumer->afsendBrevPerson( + $this->configuration['channel'], + $this->configuration['priority'], + $submissionData[$this->configuration['cpr_element']], + $cprSearchResult->getName(), + null, + null, + null, + null, + null, + null, + null, + null, + null, + 'DK', + 'PDF', + $this->templateManager->renderPdf($this->configuration['template'], $context), + $this->configuration['document_title'] + ); + break; + case 'D': + $result = $this->printServiceConsumer->afsendDigitalPostPerson( + $this->configuration['channel'], + $this->configuration['priority'], + $submissionData[$this->configuration['cpr_element']], + 'PDF', + $this->templateManager->renderPdf($this->configuration['template'], $context), + $this->configuration['document_title'] + ); + break; + } - // Base64 encode pdf for digital post service - // Invoke the service + if (false === $result) { + // Throw an error? + } } /**